chore: configure eslint for react hooks

This commit is contained in:
VardanHakobyan
2021-06-13 13:27:44 +04:00
parent 90cfd776da
commit 41a21e6ca7

View File

@@ -7,7 +7,7 @@
"prettier", "prettier",
"plugin:react-hooks/recommended" "plugin:react-hooks/recommended"
], ],
"plugins": ["@typescript-eslint", "react"], "plugins": ["@typescript-eslint", "react", "react-hooks"],
"parserOptions": { "parserOptions": {
"project": "./app/assets/javascripts/tsconfig.json" "project": "./app/assets/javascripts/tsconfig.json"
}, },
@@ -17,7 +17,9 @@
"no-console": "off", "no-console": "off",
"semi": 1, "semi": 1,
"camelcase": "warn", "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": { "env": {
"browser": true "browser": true