@geops/eslint-config-react 1.2.0 → 1.3.1
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/index.js +3 -1
- package/package.json +7 -6
- package/confusing-browser-globals.flat.js +0 -64
- package/index.flat.js +0 -62
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports = {
|
|
|
17
17
|
parserOptions: {
|
|
18
18
|
project: true,
|
|
19
19
|
},
|
|
20
|
+
plugins: ["eslint-plugin-react-compiler"],
|
|
20
21
|
rules: {
|
|
21
22
|
"import/order": "off",
|
|
22
23
|
"jsx-a11y/click-events-have-key-events": "error",
|
|
@@ -43,12 +44,13 @@ module.exports = {
|
|
|
43
44
|
"index-type",
|
|
44
45
|
"unknown",
|
|
45
46
|
],
|
|
46
|
-
internalPattern: ["
|
|
47
|
+
internalPattern: ["^@/.*"],
|
|
47
48
|
},
|
|
48
49
|
],
|
|
49
50
|
"no-nested-ternary": "error",
|
|
50
51
|
"no-param-reassign": "error",
|
|
51
52
|
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
53
|
+
"react-compiler/react-compiler": "error",
|
|
52
54
|
"react/destructuring-assignment": "error",
|
|
53
55
|
"@typescript-eslint/no-shadow": "error",
|
|
54
56
|
"@typescript-eslint/no-use-before-define": "error",
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geops/eslint-config-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
6
|
-
"@typescript-eslint/parser": "^8.
|
|
5
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
6
|
+
"@typescript-eslint/parser": "^8.15.0",
|
|
7
7
|
"eslint-config-prettier": "^9.1.0",
|
|
8
|
-
"eslint-plugin-cypress": "^4.
|
|
9
|
-
"eslint-plugin-jsx-a11y": "^6.10.
|
|
10
|
-
"eslint-plugin-perfectionist": "^
|
|
8
|
+
"eslint-plugin-cypress": "^4.1.0",
|
|
9
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
10
|
+
"eslint-plugin-perfectionist": "^4.0.3",
|
|
11
11
|
"eslint-plugin-react": "^7.37.2",
|
|
12
|
+
"eslint-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
|
|
12
13
|
"eslint-plugin-react-hooks": "^5.0.0"
|
|
13
14
|
},
|
|
14
15
|
"peerDependencies": {
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const confusingBrowserGlobals = [
|
|
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
|
-
];
|
|
63
|
-
|
|
64
|
-
export default confusingBrowserGlobals;
|
package/index.flat.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import prettierConfig from "eslint-config-prettier";
|
|
3
|
-
import pluginCypress from "eslint-plugin-cypress/flat";
|
|
4
|
-
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
|
-
import pluginpPerfectionist from "eslint-plugin-perfectionist";
|
|
6
|
-
import pluginReact from "eslint-plugin-react";
|
|
7
|
-
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
8
|
-
import ts from "typescript-eslint";
|
|
9
|
-
|
|
10
|
-
import confusingBrowserGlobals from "./confusing-browser-globals";
|
|
11
|
-
|
|
12
|
-
export default [
|
|
13
|
-
js.configs.recommended,
|
|
14
|
-
...ts.configs.recommendedTypeChecked,
|
|
15
|
-
...ts.configs.stylisticTypeChecked,
|
|
16
|
-
pluginCypress.configs.recommended,
|
|
17
|
-
pluginJsxA11y.flatConfigs.recommended,
|
|
18
|
-
pluginpPerfectionist.configs["recommended-alphabetical"],
|
|
19
|
-
pluginReact.configs.flat.recommended,
|
|
20
|
-
pluginReactHooks.configs.recommended,
|
|
21
|
-
prettierConfig,
|
|
22
|
-
{
|
|
23
|
-
rules: {
|
|
24
|
-
"import/order": "off",
|
|
25
|
-
"jsx-a11y/click-events-have-key-events": "error",
|
|
26
|
-
"perfectionist/sort-imports": [
|
|
27
|
-
"error",
|
|
28
|
-
{
|
|
29
|
-
groups: [
|
|
30
|
-
"builtin",
|
|
31
|
-
"external",
|
|
32
|
-
"internal",
|
|
33
|
-
"parent",
|
|
34
|
-
"sibling",
|
|
35
|
-
"side-effect",
|
|
36
|
-
"side-effect-style",
|
|
37
|
-
"index",
|
|
38
|
-
"object",
|
|
39
|
-
"style",
|
|
40
|
-
"type",
|
|
41
|
-
"builtin-type",
|
|
42
|
-
"external-type",
|
|
43
|
-
"internal-type",
|
|
44
|
-
"parent-type",
|
|
45
|
-
"sibling-type",
|
|
46
|
-
"index-type",
|
|
47
|
-
"unknown",
|
|
48
|
-
],
|
|
49
|
-
internalPattern: ["@/**"],
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
"no-nested-ternary": "error",
|
|
53
|
-
"no-param-reassign": "error",
|
|
54
|
-
"no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
|
|
55
|
-
"no-shadow": "off", // is overwritten by @typescript-eslint/no-shadow
|
|
56
|
-
"no-use-before-define": "off", // is overwritten by @typescript-eslint/no-use-before-define
|
|
57
|
-
"react/destructuring-assignment": "error",
|
|
58
|
-
"@typescript-eslint/no-shadow": "error",
|
|
59
|
-
"@typescript-eslint/no-use-before-define": "error",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
];
|