ESLint broken: Rules with suggestions must set the `meta.hasSuggestions` property to `true`

ESLint 8.0.0 comes with a breaking change for rules that provide suggestions. There is nothing you can put into your .eslintrc.js to make it work if you use rules that haven’t been updated to work after this change.

What you can do:

  • Use ESLint 7 until the plugin is updated to work with ESLint 8.
  • In case of eslint-plugin-react-hooks, the offending rule has already been updated (check this line on GitHub), it’s just that there hasn’t been a stable release of the package since. However there have been daily alpha releases, at the time of writing the latest version is 4.2.1-alpha-c3a19e5af-20211014. If you really need both ESLint 8 and this plugin, you can use an alpha version until the next stable version comes out.

Leave a Comment