Skip to content
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

Update ESLint preset to disable the autofix #8505

Closed
gaearon opened this issue Feb 17, 2020 · 5 comments
Closed

Update ESLint preset to disable the autofix #8505

gaearon opened this issue Feb 17, 2020 · 5 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Feb 17, 2020

See facebook/react#16313 (comment).

@ClementParis016
Copy link

As far as I can see, react-scripts has a dependency on eslint-plugin-react-hooks@^1.6.1 so that means the update from the issue you mentioned only works for apps that don't use react-scripts. I guess that's what you want to be addressed, correct?

Is there any blocker in making the update? I can't really find an exhaustive list of the changes in eslint-plugin-react-hooks to check that out.

@iansu iansu modified the milestones: 3.4.1, 3.4.2 Mar 20, 2020
@creatyvtype
Copy link

creatyvtype commented Apr 13, 2020

Regarding the version changes of eslint-plugin-react-hooks

For version 1* to 2.0.0:
https://github.com/facebook/react/pull/16528/files

Report Hook calls at the top level as a violation

For version 2* to 3.0.0
reactjs/react.dev#2878 @gaearon mentions the changes

TLDR: the rule is stricter and flags usage in classes now

@creatyvtype
Copy link

Would like to silence warning I'm receiving when trying to use latest version of eslint-plugin-react-hooks which is 3.0.0.

It's mentioned in #7790 that the update of the plugin will be a breaking change for react-scripts. Will it be ok in the meantime to update to allow:

    "eslint-plugin-react-hooks": "1.x || 2.x || 3.x"

@gaearon
Copy link
Contributor Author

gaearon commented Apr 13, 2020

Allow where? It is a dependency of react-scripts. No, it can't just be bumped. What needs to happen here is a bump to this dependency and a major bump of react-scripts.

@ianschmitz ianschmitz modified the milestones: 3.5, 4.0 May 3, 2020
@ianschmitz
Copy link
Contributor

Fixed in #8939.

@lock lock bot locked and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants