reactjs / reactjs/react.dev

How to configure `eslint-plugin-react-hooks` in `eslint.config.js`

Open
#6,430 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

Starting with the next version 9, ESLint will deprecate the current eslintrc format and will default use the new flat config format (eslint.config.js). Already from version 8.2.23 you can fully use the flat config format. Still, neither the README (which is used as a description for the NPM package) nor the documentation says anything about how to configure it correctly. And also no one answered the question on StackOverflow about this. Please add this information to the documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the eslint-plugin-react-hooks README and the legacy Hooks rules documentation linked in the issue, then verify the flat-config guidance against ESLint's configuration documentation. Update the documentation with the correct eslint.config.js setup, including how the plugin and its rules are configured, and confirm that both referenced documentation locations clearly explain it.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.