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

[feat] exhaustive-deps rule

Open Mohamed3on opened this issue 1 year ago • 2 comments

Describe the problem

the exhaustive-deps rule from the eslint-plugin-react helps make sure effects always have an up-to-date list of dependencies to run correctly. This is something we'd love to have before considering the migration to eslint-react. Is there a reason why it's not ported over?

Describe the solution you'd like

add the react-hooks/exhaustive-deps rule! original reference here

Alternatives considered

No response

Additional context

No response

Mohamed3on avatar Oct 04 '24 21:10 Mohamed3on

I believe the intent of this library isn't to recreate the rules that are in the react team's eslint-plugin-react-hooks, but instead to be additional rules that would be useful on top of those two. As evidenced by the examples folder where both plugins are being used: https://github.com/Rel1cx/eslint-react/blob/main/examples/vite-react-dom-app/eslint.config.js (eslint-plugin-react is a different plugin entirely.)

michaelfaith avatar Dec 19 '24 23:12 michaelfaith

Based on recent feedback on the eslint-plugin-react-hooks 7.0 update, I'm reconsidering the integration of the exhaustive-deps and rules-of-hooks rules, also mentioned in #710

Image

Rel1cx avatar Oct 12 '25 13:10 Rel1cx