-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
64 lines (63 loc) · 2.21 KB
/
eslint.config.js
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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
eslint.configs.all,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
// files: ["**/*.ts"],
languageOptions: {
parserOptions: {
project: true,
tsconfigDirName: import.meta.dirname,
},
},
rules: {
// Implicit any is prohibited because a developer must know if it's an any or a specific type
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"camelcase": "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"complexity": ["error", 25],
"line-comment-position": "off",
"max-classes-per-file": "warn",
"max-lines": "warn",
"max-lines-per-function": ["error", 100],
"max-params": ["error", 6],
"max-statements": ["error", 35],
"multiline-comment-style": "off",
"no-await-in-loop": "off",
"no-case-declarations": "off",
"no-continue": "off",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-plusplus": "off",
"no-sparse-arrays": "off",
"no-ternary": "off",
"one-var": "off",
"prefer-destructuring": "warn",
"require-unicode-regexp": "off",
"sort-imports": ["error", {
allowSeparatedGroups: true
}],
}
},
{
files: ["**/*.test.ts", "**/*.spec.ts"],
rules: {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/require-await": "off",
"class-methods-use-this": "off",
"max-classes-per-file": "off",
"max-lines": "off",
"max-lines-per-function": "off",
}
},
{
files: ["**/*.js"],
...tseslint.configs.disableTypeChecked,
},
);