Skip to content

Update ESLint preset to disable the autofix #8505

Closed
@gaearon

Description

@gaearon

Activity

added this to the 3.4.1 milestone on Feb 19, 2020
ClementParis016

ClementParis016 commented on Mar 2, 2020

@ClementParis016

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.

modified the milestones: 3.4.1, 3.4.2 on Mar 20, 2020
creatyvtype

creatyvtype commented on Apr 13, 2020

@creatyvtype

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

creatyvtype commented on Apr 13, 2020

@creatyvtype

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

gaearon commented on Apr 13, 2020

@gaearon
ContributorAuthor

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.

modified the milestones: 3.5, 4.0 on May 3, 2020
ianschmitz

ianschmitz commented on May 4, 2020

@ianschmitz
Contributor

Fixed in #8939.

locked and limited conversation to collaborators on May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @iansu@gaearon@ClementParis016@ianschmitz@creatyvtype

        Issue actions

          Update ESLint preset to disable the autofix · Issue #8505 · facebook/create-react-app