@geops/eslint-config-react 1.5.0-beta.2 → 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 +18 -19
- package/index.js +1 -35
- package/package.json +3 -3
package/flat/index.mjs
CHANGED
|
@@ -7,8 +7,7 @@ import react from "eslint-plugin-react";
|
|
|
7
7
|
import tseslint from "typescript-eslint";
|
|
8
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
|
{
|
|
@@ -36,32 +35,32 @@ 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,
|
|
48
42
|
{
|
|
49
43
|
rules: {
|
|
50
|
-
"@next/next/google-font-display": "warn",
|
|
51
|
-
"@next/next/google-font-preconnect": "warn",
|
|
52
|
-
"@next/next/no-page-custom-font": "warn",
|
|
53
|
-
"@next/next/no-img-element": "warn",
|
|
54
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
55
|
-
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
56
|
-
"@typescript-eslint/no-unsafe-call": "warn",
|
|
57
|
-
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
58
|
-
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
59
|
-
curly: "error",
|
|
60
44
|
"arrow-body-style": ["error", "always"],
|
|
45
|
+
curly: "error",
|
|
61
46
|
"no-console": "warn",
|
|
62
47
|
"prefer-template": "error",
|
|
48
|
+
"react-compiler/react-compiler": "error",
|
|
63
49
|
"react-hooks/exhaustive-deps": "error",
|
|
64
|
-
"
|
|
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",
|
|
65
64
|
},
|
|
66
65
|
}
|
|
67
66
|
),
|
package/index.js
CHANGED
|
@@ -24,35 +24,9 @@ module.exports = {
|
|
|
24
24
|
curly: "error",
|
|
25
25
|
"no-console": "warn",
|
|
26
26
|
"prefer-template": "error",
|
|
27
|
+
"react-compiler/react-compiler": "error",
|
|
27
28
|
"react-hooks/exhaustive-deps": "error",
|
|
28
|
-
"react-compiler/react-compiler": "warn",
|
|
29
29
|
"jsx-a11y/click-events-have-key-events": "error",
|
|
30
|
-
"perfectionist/sort-imports": [
|
|
31
|
-
"error",
|
|
32
|
-
{
|
|
33
|
-
groups: [
|
|
34
|
-
"builtin",
|
|
35
|
-
"external",
|
|
36
|
-
"internal",
|
|
37
|
-
"parent",
|
|
38
|
-
"sibling",
|
|
39
|
-
"side-effect",
|
|
40
|
-
"side-effect-style",
|
|
41
|
-
"index",
|
|
42
|
-
"object",
|
|
43
|
-
"style",
|
|
44
|
-
"type",
|
|
45
|
-
"builtin-type",
|
|
46
|
-
"external-type",
|
|
47
|
-
"internal-type",
|
|
48
|
-
"parent-type",
|
|
49
|
-
"sibling-type",
|
|
50
|
-
"index-type",
|
|
51
|
-
"unknown",
|
|
52
|
-
],
|
|
53
|
-
internalPattern: ["^@/.*"],
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
30
|
"mocha/no-exclusive-tests": "error",
|
|
57
31
|
"mocha/no-skipped-tests": "error",
|
|
58
32
|
"mocha/no-mocha-arrows": "off",
|
|
@@ -60,19 +34,11 @@ module.exports = {
|
|
|
60
34
|
"no-param-reassign": "error",
|
|
61
35
|
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
62
36
|
"perfectionist/sort-modules": "off",
|
|
63
|
-
"react-compiler/react-compiler": "error",
|
|
64
37
|
"react/destructuring-assignment": "error",
|
|
65
|
-
"@next/next/google-font-display": "warn",
|
|
66
|
-
"@next/next/google-font-preconnect": "warn",
|
|
67
|
-
"@next/next/no-page-custom-font": "warn",
|
|
68
|
-
"@next/next/no-img-element": "warn",
|
|
69
38
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
70
39
|
"@typescript-eslint/no-shadow": "error",
|
|
71
40
|
"@typescript-eslint/no-use-before-define": "error",
|
|
72
41
|
"@typescript-eslint/no-empty-function": "warn",
|
|
73
|
-
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
74
|
-
"@typescript-eslint/no-unsafe-call": "warn",
|
|
75
|
-
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
76
42
|
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
77
43
|
},
|
|
78
44
|
settings: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geops/eslint-config-react",
|
|
3
|
-
"version": "1.5.0-beta.
|
|
3
|
+
"version": "1.5.0-beta.3",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"eslint-config-prettier": "^10.1.1",
|
|
6
6
|
"eslint-plugin-cypress": "^4.2.0",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"eslint-plugin-perfectionist": "^4.10.1",
|
|
11
11
|
"eslint-plugin-prettier": "^5.2.3",
|
|
12
12
|
"eslint-plugin-react": "^7.37.4",
|
|
13
|
-
"eslint-plugin-react-compiler": "^19.
|
|
13
|
+
"eslint-plugin-react-compiler": "^19.1.0-rc.1",
|
|
14
14
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
15
|
-
"globals": "^
|
|
15
|
+
"globals": "^16.0.0",
|
|
16
16
|
"typescript-eslint": "^8.28.0"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|