diff --git a/.eslintrc b/.eslintrc index 6ee2367..a4a9a7a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,7 +13,8 @@ "prettier", "verdaccio", "jsx-a11y", - "codeceptjs" + "codeceptjs", + "react-hooks" ], "settings": { "react": { @@ -107,6 +108,8 @@ 2, "always" ], + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", "verdaccio/jsx-no-style": ["warn"], "verdaccio/jsx-spread": ["warn"], "jest/expect-expect": 0, diff --git a/package.json b/package.json index ee15580..8bcb49a 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-prettier": "3.1.0", "eslint-plugin-react": "7.14.3", + "eslint-plugin-react-hooks": "1.7.0", "eslint-plugin-verdaccio": "2.0.0", "file-loader": "4.2.0", "friendly-errors-webpack-plugin": "1.7.0", diff --git a/yarn.lock b/yarn.lock index 4c5787c..d943203 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5508,6 +5508,11 @@ eslint-plugin-prettier@3.1.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-react-hooks@1.7.0: + version "1.7.0" + resolved "https://registry.verdaccio.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" + integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA== + eslint-plugin-react@7.14.3: version "7.14.3" resolved "https://registry.verdaccio.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz#911030dd7e98ba49e1b2208599571846a66bdf13"