@geops/eslint-config-react 1.5.0-beta.1 → 1.5.0-beta.3
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.
- package/flat/index.mjs +23 -12
- package/index.js +9 -28
- package/package-lock.json +5200 -0
- package/package.json +8 -8
package/flat/index.mjs
CHANGED
|
@@ -5,10 +5,9 @@ import perfectionist from "eslint-plugin-perfectionist";
|
|
|
5
5
|
import prettier from "eslint-plugin-prettier/recommended";
|
|
6
6
|
import react from "eslint-plugin-react";
|
|
7
7
|
import tseslint from "typescript-eslint";
|
|
8
|
-
import pluginCypress from
|
|
8
|
+
import pluginCypress from "eslint-plugin-cypress/flat";
|
|
9
9
|
import globals from "globals";
|
|
10
|
-
|
|
11
|
-
const compat = new FlatCompat();
|
|
10
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
12
11
|
|
|
13
12
|
export default [
|
|
14
13
|
{
|
|
@@ -22,7 +21,7 @@ export default [
|
|
|
22
21
|
...globals.mocha,
|
|
23
22
|
...globals.vitest,
|
|
24
23
|
...pluginCypress.globals,
|
|
25
|
-
}
|
|
24
|
+
},
|
|
26
25
|
},
|
|
27
26
|
settings: {
|
|
28
27
|
react: { version: "detect" },
|
|
@@ -36,12 +35,7 @@ export default [
|
|
|
36
35
|
tseslint.configs.stylistic,
|
|
37
36
|
react.configs.flat.recommended,
|
|
38
37
|
react.configs.flat["jsx-runtime"], // Avoid having the React-in-jsx-scope rule activated
|
|
39
|
-
|
|
40
|
-
extends: ["plugin:react-hooks/recommended"],
|
|
41
|
-
rules: {
|
|
42
|
-
"react-hooks/exhaustive-deps": "error",
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
38
|
+
reactHooks.configs["recommended-latest"],
|
|
45
39
|
jsxA11y.flatConfigs.recommended,
|
|
46
40
|
perfectionist.configs["recommended-alphabetical"],
|
|
47
41
|
prettier,
|
|
@@ -49,8 +43,25 @@ export default [
|
|
|
49
43
|
rules: {
|
|
50
44
|
"arrow-body-style": ["error", "always"],
|
|
51
45
|
curly: "error",
|
|
52
|
-
"
|
|
46
|
+
"no-console": "warn",
|
|
47
|
+
"prefer-template": "error",
|
|
48
|
+
"react-compiler/react-compiler": "error",
|
|
49
|
+
"react-hooks/exhaustive-deps": "error",
|
|
50
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
51
|
+
"mocha/no-exclusive-tests": "error",
|
|
52
|
+
"mocha/no-skipped-tests": "error",
|
|
53
|
+
"mocha/no-mocha-arrows": "off",
|
|
54
|
+
"no-nested-ternary": "error",
|
|
55
|
+
"no-param-reassign": "error",
|
|
56
|
+
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
57
|
+
"perfectionist/sort-modules": "off",
|
|
58
|
+
"react/destructuring-assignment": "error",
|
|
59
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
60
|
+
"@typescript-eslint/no-shadow": "error",
|
|
61
|
+
"@typescript-eslint/no-use-before-define": "error",
|
|
62
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
63
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
53
64
|
},
|
|
54
|
-
}
|
|
65
|
+
}
|
|
55
66
|
),
|
|
56
67
|
];
|
package/index.js
CHANGED
|
@@ -20,34 +20,13 @@ module.exports = {
|
|
|
20
20
|
},
|
|
21
21
|
plugins: ["eslint-plugin-react-compiler"],
|
|
22
22
|
rules: {
|
|
23
|
-
"
|
|
23
|
+
"arrow-body-style": ["error", "always"],
|
|
24
|
+
curly: "error",
|
|
25
|
+
"no-console": "warn",
|
|
26
|
+
"prefer-template": "error",
|
|
27
|
+
"react-compiler/react-compiler": "error",
|
|
28
|
+
"react-hooks/exhaustive-deps": "error",
|
|
24
29
|
"jsx-a11y/click-events-have-key-events": "error",
|
|
25
|
-
"perfectionist/sort-imports": [
|
|
26
|
-
"error",
|
|
27
|
-
{
|
|
28
|
-
groups: [
|
|
29
|
-
"builtin",
|
|
30
|
-
"external",
|
|
31
|
-
"internal",
|
|
32
|
-
"parent",
|
|
33
|
-
"sibling",
|
|
34
|
-
"side-effect",
|
|
35
|
-
"side-effect-style",
|
|
36
|
-
"index",
|
|
37
|
-
"object",
|
|
38
|
-
"style",
|
|
39
|
-
"type",
|
|
40
|
-
"builtin-type",
|
|
41
|
-
"external-type",
|
|
42
|
-
"internal-type",
|
|
43
|
-
"parent-type",
|
|
44
|
-
"sibling-type",
|
|
45
|
-
"index-type",
|
|
46
|
-
"unknown",
|
|
47
|
-
],
|
|
48
|
-
internalPattern: ["^@/.*"],
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
30
|
"mocha/no-exclusive-tests": "error",
|
|
52
31
|
"mocha/no-skipped-tests": "error",
|
|
53
32
|
"mocha/no-mocha-arrows": "off",
|
|
@@ -55,10 +34,12 @@ module.exports = {
|
|
|
55
34
|
"no-param-reassign": "error",
|
|
56
35
|
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
57
36
|
"perfectionist/sort-modules": "off",
|
|
58
|
-
"react-compiler/react-compiler": "error",
|
|
59
37
|
"react/destructuring-assignment": "error",
|
|
38
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
60
39
|
"@typescript-eslint/no-shadow": "error",
|
|
61
40
|
"@typescript-eslint/no-use-before-define": "error",
|
|
41
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
42
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
62
43
|
},
|
|
63
44
|
settings: {
|
|
64
45
|
react: { version: "detect" },
|