-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (53 loc) · 1.8 KB
/
eslint.config.js
File metadata and controls
55 lines (53 loc) · 1.8 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
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
const tsconfigRootDir = path.dirname(fileURLToPath(import.meta.url));
export default tseslint.config(
{
ignores: [
"**/dist/**",
"**/coverage/**",
"**/node_modules/**",
".turbo/**",
"package-lock.json"
]
},
js.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
files: ["**/*.ts", "**/*.tsx", "**/*.cts", "**/*.mts"],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir
}
},
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off"
}
}
);