This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import typescriptParser from "@typescript-eslint/parser";
|
||||
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
|
||||
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
||||
|
||||
const eslintConfig = [
|
||||
js.configs.recommended,
|
||||
@@ -16,8 +18,7 @@ const eslintConfig = [
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// Allow console statements in development
|
||||
"no-console": "off",
|
||||
"no-console": "warn",
|
||||
"no-unused-vars": "warn",
|
||||
},
|
||||
},
|
||||
@@ -38,11 +39,21 @@ const eslintConfig = [
|
||||
...globals.es2021,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": typescriptPlugin,
|
||||
"react-hooks": reactHooksPlugin,
|
||||
},
|
||||
rules: {
|
||||
// Allow console statements in development
|
||||
"no-console": "off",
|
||||
"no-unused-vars": "off", // TypeScript handles this better
|
||||
"no-undef": "off", // TypeScript handles this better
|
||||
"no-console": "warn",
|
||||
"no-unused-vars": "off",
|
||||
"no-undef": "off",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"@typescript-eslint/no-unused-vars": ["warn", {
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
}],
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
},
|
||||
},
|
||||
// Ignore config files and build outputs
|
||||
|
||||
Reference in New Issue
Block a user