eslint-config icon indicating copy to clipboard operation
eslint-config copied to clipboard

Unable to use `react` config on ESLint v9

Open fregante opened this issue 6 months ago • 1 comments

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

  1. Add legacy-peer-deps=true to your .npmrc file
  2. Add a react key to your antfu() config
  3. Run npm install -D eslint-plugin-react-hooks@beta
  4. Run eslint

Related issues to follow

  • https://github.com/facebook/react/issues/28313
  • https://github.com/antfu/eslint-config/issues/571

fregante avatar Jul 31 '24 16:07 fregante