-
Notifications
You must be signed in to change notification settings - Fork 7.7k
How to configure eslint-plugin-react-hooks
in eslint.config.js
#6430
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
eslint-plugin-react-hooks
in eslint.config.js
eslint-plugin-react-hooks
in eslint.config.js
My app is in CRA JS and am trying to migrate from .eslintrc to eslint.config.mjs by using the migrator. This is my eslint.config.mjs file after migration:
Package.json:
now when am trying to build the project am getting:
|
To configure eslint-plugin-react-hooks in your eslint.config.js, you can use the following line: ...fixupConfigRules(compat.extends("plugin:react-hooks/recommended")), However, please note that the react-hooks plugin does not yet fully support the new flat config format. For a more detailed guide and insights into the challenges I faced during my ESLint v9 migration, you can check out my blog article: 🚀 Just completed an ESLint v9 migration, and wow… what a ride! 😵💫 I encountered breaking changes, weird errors, and unexpected surprises—but I documented everything to help you avoid the same pitfalls. If you’re planning to upgrade (or still hesitating), this guide might save you some headaches: |
Uh oh!
There was an error while loading. Please reload this page.
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.The text was updated successfully, but these errors were encountered: