Skip to content

Commit 19c8201

Browse files
authored
[compiler] Update docs on eslint-plugin-react-hooks installation (#7956)
The compiler rule is now enabled by default in 6.0.0-rc.2, so there is no longer a need to manually enable the compiler rule in user's eslint configs.
1 parent 94a1164 commit 19c8201

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/content/learn/react-compiler/installation.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,7 @@ Install the ESLint plugin:
176176
npm install -D eslint-plugin-react-hooks@rc
177177
</TerminalBlock>
178178

179-
Then enable the compiler rule in your ESLint configuration:
180-
181-
```js {3}
182-
// .eslintrc.js
183-
module.exports = {
184-
rules: {
185-
'react-hooks/react-compiler': 'error',
186-
},
187-
};
188-
```
179+
If you haven't already configured eslint-plugin-react-hooks, follow the [installation instructions in the readme](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md#installation). The compiler rule is enabled by default in the latest RC, so no additional configuration is needed.
189180

190181
The ESLint rule will:
191182
- Identify violations of the [Rules of React](/reference/rules)

0 commit comments

Comments
 (0)