[Bug]: eslint-plugin-react-hooks documentation says that 2 rules are recommended and all others are opt-in but that's not true
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
Summary
https://react.dev/reference/eslint-plugin-react-hooks says:
Starting in version 6.0, these rules are available to opt-in:
...
According to that page only exhaustive-deps and rules-of-hooks are recommended.
But if you look are the source code for 7.0, you can see that extending configs.flat.recommended will more or less enable ALL the rules, including the ones related to the compiler:
Either the documentation needs to be updated or there is a bug in eslint-plugin-react-hooks where the recommended flat configs enabled too many rules. I am not in a position to decide who is wrong here :).
Page
https://react.dev/reference/eslint-plugin-react-hooks
Details
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the eslint-plugin-react-hooks documentation at react.dev/reference/eslint-plugin-react-hooks with the referenced configuration in packages/eslint-plugin-react-hooks/src/index.ts around lines 49-52. Determine whether the recommended configuration or the documentation is inconsistent, then update the relevant source and verify that the documented rule behavior matches the configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript, react
- Domain
- documentation, tooling
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100