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

add eslint-plugin-react-hooks & accompanying rules #63

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions eslintrc.json
Expand Up @@ -9,12 +9,13 @@

"settings": {
"react": {
"version": "detect"
"version": "latest"
Copy link

Choose a reason for hiding this comment

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

I'd assume detect is correct as we can't assume the developer is always on the latest React release?

Copy link
Member

Choose a reason for hiding this comment

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

Please revert this

}
},

"plugins": [
"react"
"react",
"react-hooks"
],

"extends": [
Expand All @@ -31,6 +32,8 @@
"react/no-unknown-property": "error",
"react/no-unused-prop-types": "error",
"react/prop-types": "error",
"react/react-in-jsx-scope": "error"
"react/react-in-jsx-scope": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
Copy link
Member

Choose a reason for hiding this comment

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

All rules in standard are errors. We don't do warnings. Please change this to "error"

}
}
19 changes: 10 additions & 9 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "eslint-config-standard-react",
"description": "JavaScript Standard Style React/JSX support - ESLint Shareable Config",
"version": "9.2.0",
"version": "10.0.0",
Copy link

Choose a reason for hiding this comment

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

Version bump is usually done by the maintainer on the release commit so you may want to revert this.

Copy link
Member

Choose a reason for hiding this comment

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

Please revert this change.

"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
Expand All @@ -11,12 +11,17 @@
"url": "https://github.com/feross/eslint-config-standard-react/issues"
},
"dependencies": {
"eslint-config-standard-jsx": "^8.0.0"
"eslint-config-standard-jsx": "^8.1.0"
},
"devDependencies": {
"eslint": "^6.2.2",
"eslint-plugin-react": "^7.6.1",
"tape": "^4.8.0"
"eslint": "^7.7.0",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.0",
"tape": "^5.0.1"
},
"peerDependencies": {
"eslint": ">=7.7.0",
"eslint-plugin-react": ">=7.20.6"
},
"homepage": "https://github.com/feross/eslint-config-standard-react",
"keywords": [
Expand Down Expand Up @@ -49,10 +54,6 @@
],
"license": "MIT",
"main": "index.js",
"peerDependencies": {
"eslint": ">=6.2.2",
"eslint-plugin-react": ">=7.6.1"
},
Copy link
Member

Choose a reason for hiding this comment

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

Please revert all version changes and keep this PR focused on adding support for eslint-plugin-react-hooks only.

"repository": {
"type": "git",
"url": "git://github.com/feross/eslint-config-standard-react.git"
Expand Down