chore: configure eslint for react hooks
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user