-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
50 lines (40 loc) · 1.38 KB
/
.eslintrc.cjs
File metadata and controls
50 lines (40 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ["@herowcode/eslint-config/react", "eslint:recommended"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
// Disable prettier conflicts
"prettier/prettier": "off",
// React refresh warnings only
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
// Allow any type (common in this codebase)
"@typescript-eslint/no-explicit-any": "off",
// Allow unused variables starting with _
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
],
// Disable strict import rules that cause issues
"import/no-duplicates": "off",
"import/first": "off",
"import-helpers/order-imports": "off",
// Allow missing dependencies in useEffect (common pattern)
"react-hooks/exhaustive-deps": "warn",
// Allow case declarations
"no-case-declarations": "off",
// Allow unescaped entities in JSX
"react/no-unescaped-entities": "off",
// Allow undefined React (auto-imported)
"no-undef": "off",
// Allow unreachable code (sometimes intentional)
"no-unreachable": "warn",
// Allow constant conditions (sometimes intentional)
"no-constant-condition": "warn",
},
};