@ethang/eslint-config 19.2.11 → 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 +1 -1
- 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
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
|
{
|