eslint-config
eslint-config copied to clipboard
Unable to use `react` config on ESLint v9
This is not strictly a bug with the config, but it's because the stable version of eslint-plugin-react-hooks (v4) does not have ESLint 9 as a peer config.
As suggested by @thien-do in https://github.com/antfu/eslint-config/issues/558#issuecomment-2253039214, you can install the beta version.
Steps to fix it temporarily
- Add
legacy-peer-deps=true
to your .npmrc file - Add a
react
key to yourantfu()
config - Run
npm install -D eslint-plugin-react-hooks@beta
- Run eslint
Related issues to follow
- https://github.com/facebook/react/issues/28313
- https://github.com/antfu/eslint-config/issues/571