@geops/eslint-config-react 1.5.0-beta.3 → 1.5.0-beta.5
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/confusing-browser-globals.mjs +62 -0
- package/flat/index.mjs +2 -22
- package/flat/rules.mjs +24 -0
- package/index.js +2 -23
- package/package.json +1 -1
- package/rules.js +24 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
"addEventListener",
|
|
3
|
+
"blur",
|
|
4
|
+
"close",
|
|
5
|
+
"closed",
|
|
6
|
+
"confirm",
|
|
7
|
+
"defaultStatus",
|
|
8
|
+
"defaultstatus",
|
|
9
|
+
"event",
|
|
10
|
+
"external",
|
|
11
|
+
"find",
|
|
12
|
+
"focus",
|
|
13
|
+
"frameElement",
|
|
14
|
+
"frames",
|
|
15
|
+
"history",
|
|
16
|
+
"innerHeight",
|
|
17
|
+
"innerWidth",
|
|
18
|
+
"isFinite",
|
|
19
|
+
"isNaN",
|
|
20
|
+
"length",
|
|
21
|
+
"location",
|
|
22
|
+
"locationbar",
|
|
23
|
+
"menubar",
|
|
24
|
+
"moveBy",
|
|
25
|
+
"moveTo",
|
|
26
|
+
"name",
|
|
27
|
+
"onblur",
|
|
28
|
+
"onerror",
|
|
29
|
+
"onfocus",
|
|
30
|
+
"onload",
|
|
31
|
+
"onresize",
|
|
32
|
+
"onunload",
|
|
33
|
+
"open",
|
|
34
|
+
"opener",
|
|
35
|
+
"opera",
|
|
36
|
+
"outerHeight",
|
|
37
|
+
"outerWidth",
|
|
38
|
+
"pageXOffset",
|
|
39
|
+
"pageYOffset",
|
|
40
|
+
"parent",
|
|
41
|
+
"print",
|
|
42
|
+
"removeEventListener",
|
|
43
|
+
"resizeBy",
|
|
44
|
+
"resizeTo",
|
|
45
|
+
"screen",
|
|
46
|
+
"screenLeft",
|
|
47
|
+
"screenTop",
|
|
48
|
+
"screenX",
|
|
49
|
+
"screenY",
|
|
50
|
+
"scroll",
|
|
51
|
+
"scrollbars",
|
|
52
|
+
"scrollBy",
|
|
53
|
+
"scrollTo",
|
|
54
|
+
"scrollX",
|
|
55
|
+
"scrollY",
|
|
56
|
+
"self",
|
|
57
|
+
"status",
|
|
58
|
+
"statusbar",
|
|
59
|
+
"stop",
|
|
60
|
+
"toolbar",
|
|
61
|
+
"top",
|
|
62
|
+
];
|
package/flat/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ 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 rules from "./rules.mjs";
|
|
11
12
|
|
|
12
13
|
export default [
|
|
13
14
|
{
|
|
@@ -40,28 +41,7 @@ export default [
|
|
|
40
41
|
perfectionist.configs["recommended-alphabetical"],
|
|
41
42
|
prettier,
|
|
42
43
|
{
|
|
43
|
-
rules:
|
|
44
|
-
"arrow-body-style": ["error", "always"],
|
|
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",
|
|
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",
|
|
64
|
-
},
|
|
44
|
+
rules: rules,
|
|
65
45
|
}
|
|
66
46
|
),
|
|
67
47
|
];
|
package/flat/rules.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import confusingBrowserGlobals from "./confusing-browser-globals.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
"arrow-body-style": ["error", "always"],
|
|
5
|
+
curly: "error",
|
|
6
|
+
"no-console": "warn",
|
|
7
|
+
"prefer-template": "error",
|
|
8
|
+
"react-compiler/react-compiler": "error",
|
|
9
|
+
"react-hooks/exhaustive-deps": "error",
|
|
10
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
11
|
+
"mocha/no-exclusive-tests": "error",
|
|
12
|
+
"mocha/no-skipped-tests": "error",
|
|
13
|
+
"mocha/no-mocha-arrows": "off",
|
|
14
|
+
"no-nested-ternary": "error",
|
|
15
|
+
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
16
|
+
"no-param-reassign": "error",
|
|
17
|
+
"perfectionist/sort-modules": "off",
|
|
18
|
+
"react/destructuring-assignment": "error",
|
|
19
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
20
|
+
"@typescript-eslint/no-shadow": "error",
|
|
21
|
+
"@typescript-eslint/no-use-before-define": "error",
|
|
22
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
23
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
24
|
+
};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const rules = require("./rules");
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
@@ -19,28 +19,7 @@ module.exports = {
|
|
|
19
19
|
project: true,
|
|
20
20
|
},
|
|
21
21
|
plugins: ["eslint-plugin-react-compiler"],
|
|
22
|
-
rules:
|
|
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",
|
|
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",
|
|
35
|
-
"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
|
-
},
|
|
22
|
+
rules: rules,
|
|
44
23
|
settings: {
|
|
45
24
|
react: { version: "detect" },
|
|
46
25
|
},
|
package/package.json
CHANGED
package/rules.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const confusingBrowserGlobals = require("./confusing-browser-globals");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
"arrow-body-style": ["error", "always"],
|
|
5
|
+
curly: "error",
|
|
6
|
+
"no-console": "warn",
|
|
7
|
+
"prefer-template": "error",
|
|
8
|
+
"react-compiler/react-compiler": "error",
|
|
9
|
+
"react-hooks/exhaustive-deps": "error",
|
|
10
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
11
|
+
"mocha/no-exclusive-tests": "error",
|
|
12
|
+
"mocha/no-skipped-tests": "error",
|
|
13
|
+
"mocha/no-mocha-arrows": "off",
|
|
14
|
+
"no-nested-ternary": "error",
|
|
15
|
+
"no-param-reassign": "error",
|
|
16
|
+
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
17
|
+
"perfectionist/sort-modules": "off",
|
|
18
|
+
"react/destructuring-assignment": "error",
|
|
19
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
20
|
+
"@typescript-eslint/no-shadow": "error",
|
|
21
|
+
"@typescript-eslint/no-use-before-define": "error",
|
|
22
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
23
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
24
|
+
};
|