File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
packages/eslint-plugin-react-hooks Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 11# ` eslint-plugin-react-hooks `
22
3- This ESLint plugin enforces the [ Rules of Hooks ] ( https://react.dev/reference/rules/rules-of-hooks ) .
3+ This ESLint plugin:
44
5- It is a part of the [ Hooks API] ( https://react.dev/reference/react/hooks ) for React.
5+ - reports violations of the [ Rules of Hooks] ( https://react.dev/reference/rules/rules-of-hooks )
6+ - reports React code problematic for the React compiler
67
78## Installation
89
@@ -33,6 +34,21 @@ export default [
3334];
3435```
3536
37+ Optionally, enable the React compiler rule:
38+
39+ ``` js
40+ import * as reactHooks from ' eslint-plugin-react-hooks' ;
41+
42+ export default [
43+ reactHooks .configs .recommended ,
44+ {
45+ rules: {
46+ ' react-hooks/react-compiler' : ' error' ,
47+ },
48+ },
49+ ];
50+ ```
51+
3652#### 5.2.0
3753
3854For users of 5.2.0 (the first version with flat config support), add the ` recommended-latest ` config.
You can’t perform that action at this time.
0 commit comments