Skip to content

Commit

Permalink
feat(react): add eslint-plugin-react-hooks (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored Jun 25, 2019
1 parent f83a7fd commit ad0fc25
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.1",
"eslint-restricted-globals": "^0.2.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
"./browser.js",
"./rules/plugins/react.js",
"./rules/plugins/react-jsx.js",
"./rules/plugins/react-hooks.js",
"./rules/plugins/jsx-a11y.js",
],
};
7 changes: 7 additions & 0 deletions rules/plugins/react-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
plugins: ["react-hooks"],
rules: {
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
},
};

0 comments on commit ad0fc25

Please sign in to comment.