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
eslint-plugin-react-hooks suggests adding a dependency on a function that always changes #15488
Comments
Currently working on this enhancement 🏗️ |
can I add request? I want eslint to warn about possible dependencies error but not fix with --fix. Right now it is always fix my code regardless. |
I think it's useful in most cases to keep |
It would be great if you could request this in ESLint itself. We could add something like this but it seems like a more generic issue that would be better addressed in the tool. Even better — it would be nice to signal ESLint that the fix is a suggestion but should not be applied automatically. Then IDEs could offer it behind a click, but it would still require manual inspection. |
The second one is also not hepfull, if you move it into |
I'm also in need of this fix. This breaks code and should be turned off until it's 'fixed' |
If you write:
then you get the error:
But if you follow that advice and add
fetchOrg
to the dep array, you get:Ideally it could suggest the second solution immediately, instead of suggesting a remediation that it will immediately warn about.
The text was updated successfully, but these errors were encountered: