@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 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
- - 73 rules for **React**
34
+ - 74 rules for **React**
35
35
  - `import reactConfig from "@ethang/eslint-config/config.react.js";`
36
- - 71 rules from [@eslint-react/eslint-plugin](https://eslint-react.xyz/)
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";`
@@ -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: "fixupPluginRules(reactHooks)", // TODO remove with v9 compat
258
+ pluginValue: "reactHooks",
259
259
  type: "react",
260
260
  url: "https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks",
261
261
  },
@@ -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
@@ -5,6 +5,7 @@ await projectBuilder("eslint-config-ethang", "master", {
5
5
  isLibrary: true,
6
6
  scripts: [
7
7
  "pnpm up -i --latest",
8
+ "pnpm dedupe",
8
9
  "bun ./build/update-rules.ts",
9
10
  "bun ./build/update-readme.ts",
10
11
  "pnpm lint",
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": fixupPluginRules(reactHooks),
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.11.4",
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.14.4",
17
- "@eslint-react/eslint-plugin": "^1.14.3",
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": "^4.6.2",
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.14.4",
57
- "@eslint-react/eslint-plugin": "^1.14.3",
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": "^4.6.2",
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
@@ -4,6 +4,7 @@ import reactHooks from "eslint-plugin-react-hooks";
4
4
 
5
5
  import { genRules, getNonDeprecatedRules } from "./gen-rules.ts";
6
6
 
7
+ // @ts-expect-error ignore types
7
8
  const reactRuleNames = Object.keys(getNonDeprecatedRules(react.rules));
8
9
  const customReactRules = [
9
10
  {