diff --git a/packages/eslint-plugin-react-hooks/README.md b/packages/eslint-plugin-react-hooks/README.md index 10020afd61038..e7b8bf015a2cb 100644 --- a/packages/eslint-plugin-react-hooks/README.md +++ b/packages/eslint-plugin-react-hooks/README.md @@ -1,8 +1,9 @@ # `eslint-plugin-react-hooks` -This ESLint plugin enforces the [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks). +This ESLint plugin: -It is a part of the [Hooks API](https://react.dev/reference/react/hooks) for React. +- reports violations of the [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks) +- reports React code problematic for the React compiler ## Installation @@ -33,6 +34,21 @@ export default [ ]; ``` +Optionally, enable the React compiler rule: + +```js +import * as reactHooks from 'eslint-plugin-react-hooks'; + +export default [ + reactHooks.configs.recommended, + { + rules: { + 'react-hooks/react-compiler': 'error', + }, + }, +]; +``` + #### 5.2.0 For users of 5.2.0 (the first version with flat config support), add the `recommended-latest` config.