ESLint: react-hooks
This commit is contained in:
parent
d04f6c9ebc
commit
0876c7a308
3 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,7 @@ module.exports = {
|
|||
'jsx-a11y',
|
||||
'import',
|
||||
'promise',
|
||||
'react-hooks',
|
||||
],
|
||||
|
||||
parserOptions: {
|
||||
|
@ -205,5 +206,8 @@ module.exports = {
|
|||
'import/no-webpack-loader-syntax': 'error',
|
||||
|
||||
'promise/catch-or-return': 'error',
|
||||
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -156,6 +156,7 @@
|
|||
"eslint-plugin-jsx-a11y": "~6.2.3",
|
||||
"eslint-plugin-promise": "~4.2.0",
|
||||
"eslint-plugin-react": "~7.17.0",
|
||||
"eslint-plugin-react-hooks": "^4.0.4",
|
||||
"jest": "^26.0.1",
|
||||
"raf": "^3.4.1",
|
||||
"react-intl-translations-manager": "^5.0.3",
|
||||
|
|
|
@ -4523,6 +4523,11 @@ eslint-plugin-promise@~4.2.0:
|
|||
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
|
||||
integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==
|
||||
|
||||
eslint-plugin-react-hooks@^4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz#aed33b4254a41b045818cacb047b81e6df27fa58"
|
||||
integrity sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA==
|
||||
|
||||
eslint-plugin-react@~7.17.0:
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.17.0.tgz#a31b3e134b76046abe3cd278e7482bd35a1d12d7"
|
||||
|
|
Loading…
Reference in a new issue