Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint-plugin-react-hooks] Prefer recommended eslint configuration #18951

Merged
merged 2 commits into from May 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 14 additions & 11 deletions packages/eslint-plugin-react-hooks/README.md
Expand Up @@ -18,7 +18,20 @@ npm install eslint-plugin-react-hooks --save-dev
yarn add eslint-plugin-react-hooks --dev
```

Then add it to your ESLint configuration:
Then extend the recommended eslint config:

```js
{
"extends": [
// ...
"plugin:react-hooks/recommended"
]
}
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
Expand All @@ -34,16 +47,6 @@ Then add it to your ESLint configuration:
}
```

Or use the recommended config:

```js
{
"extends": [
// ...
"plugin:react-hooks/recommended"
]
}
```

## Valid and Invalid Examples

Expand Down