@geops/eslint-config-react 1.5.0-beta.3 → 1.5.0-beta.4
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 +3 -19
- package/index.js +2 -20
- package/package.json +1 -1
- package/rules.js +21 -0
package/flat/index.mjs
CHANGED
|
@@ -8,6 +8,8 @@ import tseslint from "typescript-eslint";
|
|
|
8
8
|
import pluginCypress from "eslint-plugin-cypress/flat";
|
|
9
9
|
import globals from "globals";
|
|
10
10
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
11
|
+
import * as confusingBrowserGlobals from "../confusing-browser-globals";
|
|
12
|
+
import rules from "../rules";
|
|
11
13
|
|
|
12
14
|
export default [
|
|
13
15
|
{
|
|
@@ -41,26 +43,8 @@ export default [
|
|
|
41
43
|
prettier,
|
|
42
44
|
{
|
|
43
45
|
rules: {
|
|
44
|
-
|
|
45
|
-
curly: "error",
|
|
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",
|
|
46
|
+
...rules,
|
|
56
47
|
"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",
|
|
64
48
|
},
|
|
65
49
|
}
|
|
66
50
|
),
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const confusingBrowserGlobals = require("./confusing-browser-globals");
|
|
2
|
-
|
|
2
|
+
const rules = require("./rules");
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
5
|
"eslint:recommended",
|
|
@@ -20,26 +20,8 @@ module.exports = {
|
|
|
20
20
|
},
|
|
21
21
|
plugins: ["eslint-plugin-react-compiler"],
|
|
22
22
|
rules: {
|
|
23
|
-
|
|
24
|
-
curly: "error",
|
|
25
|
-
"no-console": "warn",
|
|
26
|
-
"prefer-template": "error",
|
|
27
|
-
"react-compiler/react-compiler": "error",
|
|
28
|
-
"react-hooks/exhaustive-deps": "error",
|
|
29
|
-
"jsx-a11y/click-events-have-key-events": "error",
|
|
30
|
-
"mocha/no-exclusive-tests": "error",
|
|
31
|
-
"mocha/no-skipped-tests": "error",
|
|
32
|
-
"mocha/no-mocha-arrows": "off",
|
|
33
|
-
"no-nested-ternary": "error",
|
|
34
|
-
"no-param-reassign": "error",
|
|
23
|
+
...rules,
|
|
35
24
|
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
36
|
-
"perfectionist/sort-modules": "off",
|
|
37
|
-
"react/destructuring-assignment": "error",
|
|
38
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
39
|
-
"@typescript-eslint/no-shadow": "error",
|
|
40
|
-
"@typescript-eslint/no-use-before-define": "error",
|
|
41
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
42
|
-
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
43
25
|
},
|
|
44
26
|
settings: {
|
|
45
27
|
react: { version: "detect" },
|
package/package.json
CHANGED
package/rules.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"arrow-body-style": ["error", "always"],
|
|
3
|
+
curly: "error",
|
|
4
|
+
"no-console": "warn",
|
|
5
|
+
"prefer-template": "error",
|
|
6
|
+
"react-compiler/react-compiler": "error",
|
|
7
|
+
"react-hooks/exhaustive-deps": "error",
|
|
8
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
9
|
+
"mocha/no-exclusive-tests": "error",
|
|
10
|
+
"mocha/no-skipped-tests": "error",
|
|
11
|
+
"mocha/no-mocha-arrows": "off",
|
|
12
|
+
"no-nested-ternary": "error",
|
|
13
|
+
"no-param-reassign": "error",
|
|
14
|
+
"perfectionist/sort-modules": "off",
|
|
15
|
+
"react/destructuring-assignment": "error",
|
|
16
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
17
|
+
"@typescript-eslint/no-shadow": "error",
|
|
18
|
+
"@typescript-eslint/no-use-before-define": "error",
|
|
19
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
20
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
21
|
+
};
|