-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
114 lines (109 loc) · 3.01 KB
/
eslint.config.js
File metadata and controls
114 lines (109 loc) · 3.01 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// @ts-check
const js = require("@eslint/js");
const typescript = require("@typescript-eslint/eslint-plugin");
const typescriptParser = require("@typescript-eslint/parser");
const jsxA11y = require("eslint-plugin-jsx-a11y");
const importPlugin = require("eslint-plugin-import");
const reactHooks = require("eslint-plugin-react-hooks");
const reactRefresh = require("eslint-plugin-react-refresh");
const { defineConfig, globalIgnores } = require("eslint/config");
const globals = require("globals");
module.exports = defineConfig([
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
globalIgnores([
"**/.cache/",
"**/.corepack/",
"**/.turbo/",
"**/.cursor/",
"**/.vscode/",
"**/components/ui/",
"**/components/ai-elements/",
"**/logs.json",
"**/worker-configuration.d.ts",
"**/routeTree.gen.ts",
"**/db/migrations/",
"**/*.d.ts",
"**/node_modules/",
"**/dist/",
"**/build/",
"pnpm-lock.yaml",
]),
js.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
"@typescript-eslint": typescript,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
"jsx-a11y": jsxA11y,
import: importPlugin,
},
rules: {
"no-unused-vars": "off",
"no-console": "off",
"no-empty": "off",
"no-debugger": "error",
"prefer-const": "off",
"no-var": "error",
"no-redeclare": "off",
"no-undef": "off",
"no-param-reassign": "off",
"require-yield": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
// Disabled - bundlers handle resolution without extensions
"import/extensions": "off",
"import/no-unresolved": "off",
"import/order": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
},
},
{
files: [
"**/test/**",
"**/tests/**",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx",
],
rules: {
"no-console": "off",
},
},
]);