@ethang/eslint-config 19.2.10 → 19.3.0
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/README.md +2 -2
- package/config.react.js +7 -3
- package/package.json +11 -11
- package/setup/react.js +1 -0
package/README.md
CHANGED
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
- 51 rules for **Astro**
|
|
30
30
|
- `import astroConfig from "@ethang/eslint-config/config.astro.js";`
|
|
31
31
|
- 51 rules from [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
|
|
32
|
-
-
|
|
32
|
+
- 71 rules for **React**
|
|
33
33
|
- `import reactConfig from "@ethang/eslint-config/config.react.js";`
|
|
34
|
-
-
|
|
34
|
+
- 71 rules from [@eslint-react/eslint-plugin](https://eslint-react.xyz/)
|
|
35
35
|
- 18 rules for **Solid**
|
|
36
36
|
- `import solidConfig from "@ethang/eslint-config/config.solid.js";`
|
|
37
37
|
- 18 rules from [eslint-plugin-solid](https://github.com/solidjs-community/eslint-plugin-solid)
|
package/config.react.js
CHANGED
|
@@ -74,19 +74,23 @@ export default tseslint.config({
|
|
|
74
74
|
"react/dom/no-unsafe-target-blank": "error",
|
|
75
75
|
"react/web-api/no-leaked-event-listener": "error",
|
|
76
76
|
"react/web-api/no-leaked-interval": "error",
|
|
77
|
+
"react/web-api/no-leaked-resize-observer": "error",
|
|
77
78
|
"react/web-api/no-leaked-timeout": "error",
|
|
79
|
+
"react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
80
|
+
"react/hooks-extra/no-redundant-custom-hook": "error",
|
|
81
|
+
"react/hooks-extra/no-unnecessary-use-callback": "error",
|
|
82
|
+
"react/hooks-extra/no-unnecessary-use-memo": "error",
|
|
83
|
+
"react/hooks-extra/prefer-use-state-lazy-initialization": "error",
|
|
78
84
|
"react/hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
|
|
79
|
-
"react/hooks-extra/ensure-use-callback-has-non-empty-deps": "error",
|
|
80
85
|
"react/hooks-extra/ensure-use-memo-has-non-empty-deps": "error",
|
|
81
|
-
"react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
82
86
|
"react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
83
|
-
"react/hooks-extra/prefer-use-state-lazy-initialization": "error",
|
|
84
87
|
"react/naming-convention/component-name": "error",
|
|
85
88
|
"react/naming-convention/filename": ["error", { rule: "kebab-case" }],
|
|
86
89
|
"react/naming-convention/filename-extension": "error",
|
|
87
90
|
"react/naming-convention/use-state": "error",
|
|
88
91
|
"react/debug/class-component": "off",
|
|
89
92
|
"react/debug/function-component": "off",
|
|
93
|
+
"react/debug/hook": "off",
|
|
90
94
|
"react/debug/is-from-react": "off",
|
|
91
95
|
"react/debug/react-hooks": "off",
|
|
92
96
|
"react-hooks/rules-of-hooks": "off",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
"lint": "prettier . -w"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
16
|
+
"@eslint-react/eslint-plugin": "^1.13.0",
|
|
17
17
|
"@eslint/js": "^9.9.1",
|
|
18
18
|
"@eslint/json": "^0.4.0",
|
|
19
19
|
"@eslint/markdown": "^6.0.0",
|
|
20
|
-
"@ethang/eslint-plugin": "^0.0.
|
|
20
|
+
"@ethang/eslint-plugin": "^0.0.7",
|
|
21
21
|
"@stylistic/eslint-plugin": "^2.7.2",
|
|
22
22
|
"@tanstack/eslint-plugin-query": "^5.53.0",
|
|
23
|
-
"@typescript-eslint/parser": "^8.
|
|
23
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
24
24
|
"eslint": "^9.9.1",
|
|
25
25
|
"eslint-plugin-astro": "^1.2.3",
|
|
26
26
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
27
27
|
"eslint-plugin-compat": "^6.0.0",
|
|
28
28
|
"eslint-plugin-depend": "^0.11.0",
|
|
29
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
29
|
+
"eslint-plugin-jsx-a11y": "^6.10.0",
|
|
30
30
|
"eslint-plugin-lodash": "^8.0.0",
|
|
31
31
|
"eslint-plugin-n": "^17.10.2",
|
|
32
32
|
"eslint-plugin-perfectionist": "^3.3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
37
37
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
38
38
|
"typescript": "^5.5.4",
|
|
39
|
-
"typescript-eslint": "^8.
|
|
39
|
+
"typescript-eslint": "^8.4.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@ethang/markdown-generator": "^1.1.1",
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
"prettier": "^3.3.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
49
|
+
"@eslint-react/eslint-plugin": "^1.13.0",
|
|
50
50
|
"@eslint/js": "^9.9.1",
|
|
51
51
|
"@eslint/json": "^0.4.0",
|
|
52
52
|
"@eslint/markdown": "^6.0.0",
|
|
53
|
-
"@ethang/eslint-plugin": "^0.0.
|
|
53
|
+
"@ethang/eslint-plugin": "^0.0.7",
|
|
54
54
|
"@stylistic/eslint-plugin": "^2.7.2",
|
|
55
55
|
"@tanstack/eslint-plugin-query": "^5.53.0",
|
|
56
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
57
57
|
"eslint": "^9.9.1",
|
|
58
58
|
"eslint-plugin-astro": "^1.2.3",
|
|
59
59
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
60
60
|
"eslint-plugin-compat": "^6.0.0",
|
|
61
61
|
"eslint-plugin-depend": "^0.11.0",
|
|
62
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
62
|
+
"eslint-plugin-jsx-a11y": "^6.10.0",
|
|
63
63
|
"eslint-plugin-lodash": "^8.0.0",
|
|
64
64
|
"eslint-plugin-n": "^17.10.2",
|
|
65
65
|
"eslint-plugin-perfectionist": "^3.3.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
70
70
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
71
71
|
"typescript": "^5.5.4",
|
|
72
|
-
"typescript-eslint": "^8.
|
|
72
|
+
"typescript-eslint": "^8.4.0"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=20"
|
package/setup/react.js
CHANGED
|
@@ -8,6 +8,7 @@ const customReactRules = [
|
|
|
8
8
|
{ name: "avoid-shorthand-fragment", rule: "off" },
|
|
9
9
|
{ name: "debug/class-component", rule: "off" },
|
|
10
10
|
{ name: "debug/function-component", rule: "off" },
|
|
11
|
+
{ name: "debug/hook", rule: "off" },
|
|
11
12
|
{ name: "debug/is-from-react", rule: "off" },
|
|
12
13
|
{ name: "debug/react-hooks", rule: "off" },
|
|
13
14
|
{
|