From 41a21e6ca7f61773e7f2630b595b6fad20ab8975 Mon Sep 17 00:00:00 2001 From: VardanHakobyan Date: Sun, 13 Jun 2021 13:27:44 +0400 Subject: [PATCH] chore: configure eslint for react hooks --- .eslintrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 28f7be1df..74fa349e3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,7 +7,7 @@ "prettier", "plugin:react-hooks/recommended" ], - "plugins": ["@typescript-eslint", "react"], + "plugins": ["@typescript-eslint", "react", "react-hooks"], "parserOptions": { "project": "./app/assets/javascripts/tsconfig.json" }, @@ -17,7 +17,9 @@ "no-console": "off", "semi": 1, "camelcase": "warn", - "sort-imports": "off" + "sort-imports": "off", + "react-hooks/rules-of-hooks": "error", // Checks rules of Hooks + "react-hooks/exhaustive-deps": "error" // Checks effect dependencies }, "env": { "browser": true