@ethang/eslint-config 19.11.4 → 19.12.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/build/rule-list.ts +1 -1
- package/build/update-rules.ts +1 -4
- package/build.mjs +1 -0
- package/config.react.js +2 -2
- package/package.json +7 -7
- package/setup/react.ts +1 -0
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
- 51 rules for **Astro**
|
|
32
32
|
- `import astroConfig from "@ethang/eslint-config/config.astro.js";`
|
|
33
33
|
- 51 rules from [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
|
|
34
|
-
-
|
|
34
|
+
- 74 rules for **React**
|
|
35
35
|
- `import reactConfig from "@ethang/eslint-config/config.react.js";`
|
|
36
|
-
-
|
|
36
|
+
- 72 rules from [@eslint-react/eslint-plugin](https://eslint-react.xyz/)
|
|
37
37
|
- 2 rules from [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
|
|
38
38
|
- 18 rules for **Solid**
|
|
39
39
|
- `import solidConfig from "@ethang/eslint-config/config.solid.js";`
|
package/build/rule-list.ts
CHANGED
|
@@ -255,7 +255,7 @@ export const ruleList = [
|
|
|
255
255
|
list: reactHookRules,
|
|
256
256
|
name: "eslint-plugin-react-hooks",
|
|
257
257
|
pluginName: "react-hooks",
|
|
258
|
-
pluginValue: "
|
|
258
|
+
pluginValue: "reactHooks",
|
|
259
259
|
type: "react",
|
|
260
260
|
url: "https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks",
|
|
261
261
|
},
|
package/build/update-rules.ts
CHANGED
|
@@ -56,10 +56,7 @@ const reactFile = [
|
|
|
56
56
|
label: "React",
|
|
57
57
|
name: "react",
|
|
58
58
|
options: {
|
|
59
|
-
extraImports: [
|
|
60
|
-
'import tseslint from "typescript-eslint";',
|
|
61
|
-
'import { fixupPluginRules } from "@eslint/compat";', // TODO remove with v9 compat
|
|
62
|
-
],
|
|
59
|
+
extraImports: ['import tseslint from "typescript-eslint";'],
|
|
63
60
|
includeIgnores: true,
|
|
64
61
|
includeLanguageOptions: true,
|
|
65
62
|
includeReactVersion: true,
|
package/build.mjs
CHANGED
package/config.react.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
2
1
|
import { ignores, languageOptions } from "./constants.js";
|
|
3
2
|
import react from "@eslint-react/eslint-plugin";
|
|
4
3
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
@@ -13,7 +12,7 @@ export default tseslint.config({
|
|
|
13
12
|
},
|
|
14
13
|
plugins: {
|
|
15
14
|
react: react,
|
|
16
|
-
"react-hooks":
|
|
15
|
+
"react-hooks": reactHooks,
|
|
17
16
|
},
|
|
18
17
|
rules: {
|
|
19
18
|
"react/avoid-shorthand-boolean": "off",
|
|
@@ -87,6 +86,7 @@ export default tseslint.config({
|
|
|
87
86
|
"react/no-unused-state": "error",
|
|
88
87
|
"react/no-useless-fragment": "error",
|
|
89
88
|
"react/prefer-destructuring-assignment": "error",
|
|
89
|
+
"react/prefer-react-namespace-import": "error",
|
|
90
90
|
"react/prefer-read-only-props": "error",
|
|
91
91
|
"react/prefer-shorthand-boolean": "error",
|
|
92
92
|
"react/prefer-shorthand-fragment": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.12.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"lint": "prettier . -w"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cspell/eslint-plugin": "^8.
|
|
17
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
16
|
+
"@cspell/eslint-plugin": "^8.15.1",
|
|
17
|
+
"@eslint-react/eslint-plugin": "^1.15.0",
|
|
18
18
|
"@eslint/compat": "^1.2.0",
|
|
19
19
|
"@eslint/js": "^9.12.0",
|
|
20
20
|
"@eslint/json": "^0.5.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"eslint-plugin-lodash": "^8.0.0",
|
|
34
34
|
"eslint-plugin-n": "^17.11.1",
|
|
35
35
|
"eslint-plugin-perfectionist": "^3.8.0",
|
|
36
|
-
"eslint-plugin-react-hooks": "^
|
|
36
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
37
37
|
"eslint-plugin-solid": "^0.14.3",
|
|
38
38
|
"eslint-plugin-sonarjs": "2.0.3",
|
|
39
39
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"prettier": "^3.3.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@cspell/eslint-plugin": "^8.
|
|
57
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
56
|
+
"@cspell/eslint-plugin": "^8.15.1",
|
|
57
|
+
"@eslint-react/eslint-plugin": "^1.15.0",
|
|
58
58
|
"@eslint/compat": "^1.2.0",
|
|
59
59
|
"@eslint/js": "^9.12.0",
|
|
60
60
|
"@eslint/json": "^0.5.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"eslint-plugin-lodash": "^8.0.0",
|
|
74
74
|
"eslint-plugin-n": "^17.11.1",
|
|
75
75
|
"eslint-plugin-perfectionist": "^3.8.0",
|
|
76
|
-
"eslint-plugin-react-hooks": "^
|
|
76
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
77
77
|
"eslint-plugin-solid": "^0.14.3",
|
|
78
78
|
"eslint-plugin-sonarjs": "2.0.3",
|
|
79
79
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
package/setup/react.ts
CHANGED