@soujvnunes/eslint-config 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +17 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -149,6 +149,22 @@ var restrictedSyntaxRule = {
149
149
  {
150
150
  selector: "TSEnumDeclaration",
151
151
  message: "Avoid enums; use const assertions or union types instead."
152
+ },
153
+ {
154
+ selector: "ImportDeclaration[source.value='react'] > ImportDefaultSpecifier",
155
+ message: "Do not import the React default \u2014 use the ambient `React.*` namespace (the react-jsx runtime needs no React import)."
156
+ },
157
+ {
158
+ selector: "ImportDeclaration[source.value='react'] > ImportNamespaceSpecifier",
159
+ message: "Do not `import * as React` \u2014 use the ambient `React.*` namespace."
160
+ },
161
+ {
162
+ selector: "ImportDeclaration[source.value='react'] > ImportSpecifier[importKind='type']",
163
+ message: "Reference React types via the ambient `React.*` namespace, not a named `{ type X }` import from react."
164
+ },
165
+ {
166
+ selector: "ImportDeclaration[importKind='type'][source.value='react']",
167
+ message: 'Reference React types via the ambient `React.*` namespace, not `import type \u2026 from "react"`.'
152
168
  }
153
169
  ]
154
170
  };
@@ -178,11 +194,7 @@ var nextRules = {
178
194
  var importOrderRule = (groups) => ({
179
195
  "import-helpers/order-imports": [
180
196
  "warn",
181
- {
182
- newlinesBetween: "always",
183
- groups,
184
- alphabetize: { order: "asc", ignoreCase: true }
185
- }
197
+ { newlinesBetween: "always", groups, alphabetize: { order: "asc", ignoreCase: true } }
186
198
  ]
187
199
  });
188
200
  var buildConfig = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soujvnunes/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Shared flat ESLint config factories (base + Next.js).",
5
5
  "license": "MIT",
6
6
  "author": "soujvnunes",