Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Update eslint-plugin-react-hooks to latest major release #37

Merged
merged 3 commits into from
Aug 30, 2019

Conversation

bjankord
Copy link
Contributor

@bjankord bjankord commented Aug 22, 2019

Summary

Update eslint-plugin-react-hooks to latest major release.

Related: https://github.com/facebook/react/pull/16528/files

@bjankord bjankord changed the title Update package.json Update eslint-plugin-react-hooks to latest major release Aug 22, 2019
@@ -35,7 +35,7 @@
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.12.2",
"eslint-plugin-react-hooks": "^1.0.0"
"eslint-plugin-react-hooks": "^2.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we major version bumping this package again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding was this version adds a lint rule around usage of hooks at top level which crashes the app.

So before if you used hooks at top level; the app will crash. With pulling in this version now, if you use hooks at top level, you'll get a lint warning + app still crashes.

Based on that I'm leaning towards treating this as a minor release, however the react team considered this a breaking change.

Copy link
Contributor

@emilyrohrbough emilyrohrbough Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my vote is ship it as a patch release lol because I'd agree this seems like a breaking change :/

@cody-dot-js
Copy link

Curious why we don't use the full recommended config, namely we left off the rule:

"react-hooks/exhaustive-deps": "warn"

This rule is pretty important and suggests fixes for common pitfalls involving stale hook dependencies. Commentary here

@bjankord
Copy link
Contributor Author

@dev-cprice Added config for exhaustive-deps in this commit: 2173277

@bjankord bjankord self-assigned this Aug 30, 2019
@bjankord bjankord merged commit 4976822 into master Aug 30, 2019
@bjankord bjankord deleted the bjankord-patch-1 branch August 30, 2019 19:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants