diff --git a/eslintrc.json b/eslintrc.json index 45f3b02..703365e 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -14,7 +14,8 @@ }, "plugins": [ - "react" + "react", + "react-hooks" ], "rules": { @@ -27,6 +28,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": "warning" } } diff --git a/package.json b/package.json index 030e912..021d998 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "main": "index.js", "peerDependencies": { "eslint": "^8.8.0", - "eslint-plugin-react": "^7.28.0" + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.6.0" }, "repository": { "type": "git",