Add and fix react hooks lint rules, single repertoire view

This commit is contained in:
2024-12-28 20:54:17 +01:00
parent 29636d9946
commit 7c7bac5a9f
11 changed files with 237 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import reactHooks from "eslint-plugin-react-hooks";
import tseslint from "typescript-eslint";
export default tseslint.config({
extends: [
@@ -10,6 +11,7 @@ export default tseslint.config({
files: ["packages/*/src/**/*.{ts,tsx}"],
plugins: {
"@stylistic": stylistic,
"react-hooks": reactHooks,
},
languageOptions: {
parserOptions: {
@@ -43,5 +45,7 @@ export default tseslint.config({
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
},
});