Skip to content

Commit bc132dc

Browse files
committed
include react-hooks eslint plugin
1 parent 6fc2dce commit bc132dc

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
"prettier"
99
],
1010
"plugins": [
11-
"prettier"
11+
"prettier",
12+
"react-hooks"
1213
],
1314
"parser": "babel-eslint",
1415
"rules": {
1516
"import/prefer-default-export": "off",
1617
"prettier/prettier": "error",
18+
"react-hooks/rules-of-hooks": "error",
19+
"react-hooks/exhaustive-deps": "warn",
1720
"react/destructuring-assignment": "off",
1821
"react/jsx-filename-extension": "off",
1922
"react/jsx-one-expression-per-line": "off",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"eslint-plugin-jsx-a11y": "^6.2.1",
5050
"eslint-plugin-prettier": "^3.0.1",
5151
"eslint-plugin-react": "^7.12.4",
52+
"eslint-plugin-react-hooks": "^1.5.1",
5253
"prettier": "^1.16.4",
5354
"prop-types": "^15.7.2",
5455
"react": "^16.8.4",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3527,6 +3527,11 @@ eslint-plugin-prettier@^3.0.1:
35273527
dependencies:
35283528
prettier-linter-helpers "^1.0.0"
35293529

3530+
eslint-plugin-react-hooks@^1.5.1:
3531+
version "1.5.1"
3532+
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.5.1.tgz#3c601326914ee0e1fedd709115db4940bdbbed4a"
3533+
integrity sha512-i3dIrmZ+Ssrm0LrbbtuGcRf7EEpe1FaMuL8XnnpZO0X4tk3dZNzevWxD0/7nMAFa5yZQfNnYkfEP0MmwLvbdHw==
3534+
35303535
[email protected], eslint-plugin-react@^7.12.4:
35313536
version "7.12.4"
35323537
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c"

0 commit comments

Comments
 (0)