diff --git a/.eslintrc b/.eslintrc index a6db63fe..b7e5648a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -15,9 +15,10 @@ "project": true, "tsconfigRootDir": "__dirname" }, - "plugins": ["@typescript-eslint"], + "plugins": ["@typescript-eslint", "react-hooks"], "root": true, "rules": { + "react-hooks/exhaustive-deps": "warn", // The following rules need `noImplicitAny` to be set to `true` in our tsconfig. They are too restrictive for now, but should be reconsidered in future "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-call": "off", diff --git a/package.json b/package.json index 34c16fcb..42c6b828 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "eslint-config-ts-react-important-stuff": "^3.0.0", "eslint-plugin-playwright": "^0.16.0", "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-react-hooks": "^4.6.0", "husky": "^8.0.3", "i18next": "^23.5.1", "i18next-parser": "^8.7.0", diff --git a/yarn.lock b/yarn.lock index d2160446..beeef017 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3271,6 +3271,7 @@ __metadata: eslint-config-ts-react-important-stuff: "npm:^3.0.0" eslint-plugin-playwright: "npm:^0.16.0" eslint-plugin-prettier: "npm:^5.0.0" + eslint-plugin-react-hooks: "npm:^4.6.0" file-loader: "npm:^6.2.0" fuzzy: "npm:^0.1.3" husky: "npm:^8.0.3" @@ -9391,7 +9392,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^4.0.8": +"eslint-plugin-react-hooks@npm:^4.0.8, eslint-plugin-react-hooks@npm:^4.6.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0" peerDependencies: