You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For 7.0.0:
Slim down presets to just 3 configurations:
- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules
Removed:
- `recommended-latest`
- `recommended-latest-legacy`
- `flat/recommended`
Copy file name to clipboardExpand all lines: packages/eslint-plugin-react-hooks/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
## 7.0.0
2
+
3
+
-**Breaking:** Slim down presets to just 3 configurations, and all compiler rules are enabled by default. Removed `recommended-latest-legacy` and `flat/recommended` configs. The plugin now provides `recommended-legacy` (legacy config with all recommended rules), `recommended` (flat config with all recommended rules), and `recommended-latest` (flat config with all recommended rules plus new bleeding edge experimental compiler rules). ([@poteto](https://github.com/poteto) in [#34757](https://github.com/facebook/react/pull/34757))
4
+
1
5
## 6.1.1
2
6
3
7
**Note:** 6.1.0 accidentally allowed use of `recommended` without flat config, causing errors when used with ESLint v9's `defineConfig()` helper. This has been fixed in 6.1.1.
For users of 6.0 and beyond, add the `recommended` config.
19
+
Add the `recommended` config for all recommended rules:
24
20
25
21
```js
26
22
// eslint.config.js
27
23
importreactHooksfrom'eslint-plugin-react-hooks';
28
24
import { defineConfig } from'eslint/config';
29
25
30
26
exportdefaultdefineConfig([
31
-
{
32
-
files: ["src/**/*.{js,jsx,ts,tsx}"],
33
-
plugins: {
34
-
'react-hooks': reactHooks,
35
-
},
36
-
extends: ['react-hooks/recommended'],
37
-
},
27
+
reactHooks.configs.flat.recommended,
38
28
]);
39
29
```
40
30
41
-
#### 5.2.0
42
-
43
-
For users of 5.2.0 (the first version with flat config support), add the `recommended-latest` config.
31
+
If you want to try bleeding edge experimental compiler rules, use `recommended-latest`.
44
32
45
33
```js
34
+
// eslint.config.js
46
35
importreactHooksfrom'eslint-plugin-react-hooks';
47
36
import { defineConfig } from'eslint/config';
48
37
49
38
exportdefaultdefineConfig([
50
-
{
51
-
files: ["src/**/*.{js,jsx,ts,tsx}"],
52
-
plugins: {
53
-
'react-hooks': reactHooks,
54
-
},
55
-
extends: ['react-hooks/recommended-latest'],
56
-
},
39
+
reactHooks.configs.flat['recommended-latest'],
57
40
]);
58
41
```
59
42
60
43
### Legacy Config (.eslintrc)
61
44
62
-
#### >= 5.2.0
63
-
64
-
If you are still using ESLint below 9.0.0, you can use `recommended-legacy` for accessing a legacy version of the recommended config.
45
+
If you are still using ESLint below 9.0.0, you can use `recommended-legacy` for accessing a legacy version of the recommended config with all recommended rules.
0 commit comments