eslint-plugin-react-hooks 6.1.0-canary-86181134-20251001 → 6.1.1
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 -4
- package/cjs/eslint-plugin-react-hooks.d.ts +14 -2
- package/cjs/eslint-plugin-react-hooks.development.js +53141 -189
- package/cjs/eslint-plugin-react-hooks.production.js +52972 -189
- package/package.json +8 -10
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# `eslint-plugin-react-hooks`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
It is a part of the [Hooks API](https://react.dev/reference/react/hooks) for React.
|
|
3
|
+
The official ESLint plugin for [React](https://react.dev) which enforces the [Rules of React](https://react.dev/reference/eslint-plugin-react-hooks) and other best practices.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -89,7 +87,7 @@ If you're using a version earlier than 5.2.0, the legacy config was simply `reco
|
|
|
89
87
|
|
|
90
88
|
### Custom Configuration
|
|
91
89
|
|
|
92
|
-
If you want more fine-grained configuration, you can instead
|
|
90
|
+
If you want more fine-grained configuration, you can instead choose to enable specific rules. However, we strongly encourage using the recommended presets — see above — so that you will automatically receive new recommended rules as we add them in future versions of the plugin.
|
|
93
91
|
|
|
94
92
|
#### Flat Config (eslint.config.js|ts)
|
|
95
93
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as estree from 'estree';
|
|
2
|
-
import { Rule } from 'eslint';
|
|
2
|
+
import { Rule, Linter } from 'eslint';
|
|
3
3
|
|
|
4
4
|
declare const plugin: {
|
|
5
5
|
meta: {
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
|
-
configs: {};
|
|
9
8
|
rules: {
|
|
10
9
|
'exhaustive-deps': {
|
|
11
10
|
meta: {
|
|
@@ -73,6 +72,19 @@ declare const plugin: {
|
|
|
73
72
|
};
|
|
74
73
|
};
|
|
75
74
|
};
|
|
75
|
+
configs: {
|
|
76
|
+
"recommended-legacy": {
|
|
77
|
+
plugins: Array<string>;
|
|
78
|
+
rules: Linter.RulesRecord;
|
|
79
|
+
};
|
|
80
|
+
"recommended-latest-legacy": {
|
|
81
|
+
plugins: Array<string>;
|
|
82
|
+
rules: Linter.RulesRecord;
|
|
83
|
+
};
|
|
84
|
+
"flat/recommended": Array<Linter.Config>;
|
|
85
|
+
"recommended-latest": Array<Linter.Config>;
|
|
86
|
+
recommended: Array<Linter.Config>;
|
|
87
|
+
};
|
|
76
88
|
};
|
|
77
89
|
|
|
78
90
|
export { plugin as default };
|