eslint-config-webpack 4.7.3 → 4.8.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/configs/jest.js CHANGED
@@ -154,6 +154,8 @@ async function getJestRecommendedConfig() {
154
154
 
155
155
  "jest/prefer-mock-promise-shorthand": "error",
156
156
 
157
+ "jest/prefer-mock-return-shorthand": "error",
158
+
157
159
  // No need
158
160
  // "jest/prefer-snapshot-hint": "error",
159
161
 
package/configs/react.js CHANGED
@@ -11,12 +11,30 @@ async function getReactRecommendedConfig() {
11
11
  // Nothing
12
12
  }
13
13
 
14
+ let reactHooksPlugin;
15
+
16
+ try {
17
+ reactHooksPlugin = (await import("eslint-plugin-react-hooks")).default;
18
+ // eslint-disable-next-line unicorn/prefer-optional-catch-binding
19
+ } catch (_err) {
20
+ // Nothing
21
+ }
22
+
14
23
  const { recommended, "jsx-runtime": jsxRuntime } = (reactPlugin &&
15
24
  reactPlugin.configs &&
16
25
  reactPlugin.configs.flat) || { recommended: {}, "jsx-runtime": {} };
17
26
 
27
+ const { recommended: recommendedHooks } = (reactHooksPlugin &&
28
+ reactHooksPlugin.configs &&
29
+ reactHooksPlugin.configs.flat) || { recommended: {} };
30
+
18
31
  return {
19
32
  ...recommended,
33
+ ...recommendedHooks,
34
+ plugins: {
35
+ ...recommended.plugins,
36
+ ...recommendedHooks.plugins,
37
+ },
20
38
  files: ["**/*.{jsx,tsx}"],
21
39
  settings: {
22
40
  react: {
@@ -31,6 +49,7 @@ async function getReactRecommendedConfig() {
31
49
  rules: {
32
50
  ...recommended.rules,
33
51
  ...jsxRuntime.rules,
52
+ ...recommendedHooks.rules,
34
53
  },
35
54
  };
36
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-webpack",
3
- "version": "4.7.3",
3
+ "version": "4.8.0",
4
4
  "description": "Provides Webpack's eslint rules as an extensible shared config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -37,73 +37,37 @@
37
37
  "release": "standard-version"
38
38
  },
39
39
  "dependencies": {
40
+ "@eslint/js": "^9.39.2",
41
+ "@eslint/markdown": "^7.5.1",
42
+ "@stylistic/eslint-plugin": "^5.7.0",
40
43
  "detect-indent": "^7.0.2",
44
+ "eslint-config-prettier": "^10.1.8",
45
+ "eslint-plugin-import": "^2.32.0",
46
+ "eslint-plugin-jest": "^29.12.1",
47
+ "eslint-plugin-jsdoc": "^62.0.0",
48
+ "eslint-plugin-n": "^17.23.2",
49
+ "eslint-plugin-prettier": "^5.5.5",
50
+ "eslint-plugin-react": "^7.37.5",
51
+ "eslint-plugin-react-hooks": "^7.0.1",
52
+ "eslint-plugin-unicorn": "^62.0.0",
53
+ "globals": "^17.0.0",
41
54
  "jsonc-eslint-parser": "^2.4.2",
42
55
  "semver": "^7.7.3",
43
- "sort-package-json": "^3.6.0"
56
+ "sort-package-json": "^3.6.0",
57
+ "typescript-eslint": "^8.53.0"
44
58
  },
45
59
  "devDependencies": {
46
- "@eslint/js": "^9.39.2",
47
- "@eslint/markdown": "^7.5.1",
48
- "@stylistic/eslint-plugin": "^5.6.1",
49
60
  "eslint": "^9.39.2",
50
61
  "eslint-find-rules": "^5.0.0",
51
- "eslint-plugin-import": "^2.32.0",
52
- "eslint-plugin-jest": "^29.5.0",
53
- "eslint-plugin-jsdoc": "^61.5.0",
54
- "eslint-plugin-n": "^17.23.1",
55
- "eslint-plugin-prettier": "^5.5.3",
56
- "eslint-plugin-react": "^7.37.5",
57
- "eslint-plugin-unicorn": "^62.0.0",
58
- "globals": "^16.5.0",
59
62
  "jest": "^30.2.0",
60
- "prettier": "^3.7.4",
63
+ "prettier": "^3.8.0",
61
64
  "react": "^19.2.3",
62
65
  "react-dom": "^19.2.3",
63
66
  "standard-version": "^9.5.0",
64
- "typescript": "^5.9.3",
65
- "typescript-eslint": "^8.50.0"
67
+ "typescript": "^5.9.3"
66
68
  },
67
69
  "peerDependencies": {
68
- "@eslint/js": ">= 9.28.0",
69
- "@eslint/markdown": ">= 7.1.0",
70
- "@stylistic/eslint-plugin": ">= 4.4.1",
71
- "eslint": ">= 9.28.0",
72
- "eslint-config-prettier": "^10.1.8",
73
- "eslint-plugin-import": ">= 2.31.0",
74
- "eslint-plugin-jest": ">= 28.12.0",
75
- "eslint-plugin-jsdoc": ">= 50.7.1",
76
- "eslint-plugin-n": ">= 17.19.0",
77
- "eslint-plugin-prettier": ">= 5.5.3",
78
- "eslint-plugin-react": ">= 7.37.5",
79
- "eslint-plugin-unicorn": ">= 60.0.0",
80
- "globals": ">= 16.5.0",
81
- "prettier": ">= 3.5.3",
82
- "typescript": ">= 5.0.0",
83
- "typescript-eslint": ">= 8.50.0"
84
- },
85
- "peerDependenciesMeta": {
86
- "@eslint/markdown": {
87
- "optional": true
88
- },
89
- "eslint-plugin-jest": {
90
- "optional": true
91
- },
92
- "eslint-plugin-jsdoc": {
93
- "optional": true
94
- },
95
- "eslint-plugin-react": {
96
- "optional": true
97
- },
98
- "eslint-plugin-n": {
99
- "optional": true
100
- },
101
- "typescript": {
102
- "optional": true
103
- },
104
- "typescript-eslint": {
105
- "optional": true
106
- }
70
+ "eslint": ">= 9.28.0"
107
71
  },
108
72
  "engines": {
109
73
  "node": ">= 20.9.0"