Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions packages/eslint-plugin-react-hooks/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.
Expand Down
Loading