-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mts
More file actions
76 lines (70 loc) · 2.27 KB
/
eslint.config.mts
File metadata and controls
76 lines (70 loc) · 2.27 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
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";
export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: { globals: globals.browser },
rules: {
...js.configs.recommended.rules,
"no-useless-escape": "off",
"no-case-declarations": "off",
"no-console": "warn",
"no-debugger": "error",
"no-duplicate-imports": "error",
"no-unused-expressions": "error",
"prefer-const": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-template": "error",
"quotes": ["error", "double", { avoidEscape: true }],
"semi": ["error", "always"],
"comma-dangle": ["error", "never"],
"indent": ["error", 4, { SwitchCase: 1 }],
"max-len": ["warn", { code: 300, ignoreUrls: true }],
"eol-last": ["error", "always"],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}
],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-object-type": "off"
}
},
tseslint.configs.recommended,
// Overrides preceding configurations for test files only.
{
files: ["**/*.test.{js,ts}", "**/*.spec.{js,ts}", "**/tests/**/*.{js,ts}", "api/routes/_test_/*.{js,ts}"],
rules: {
"no-console": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-undef": "off"
}
},
globalIgnores([
"node_modules/",
"dist/",
"coverage/",
"*.js.map",
"*.d.ts",
".env",
".env.*",
"!.env.example",
"prisma_client/",
"public/",
"no_git/",
"*.log",
".git/",
".vscode/",
".kiro/",
"jest.config.js"
])
]);