-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.json
90 lines (89 loc) · 2.5 KB
/
.eslintrc.json
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
{
"ignorePatterns": ["coverage", "node_modules", "dist"],
"env": {
"node": true,
"es2022": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"semi": ["warn", "always"],
"complexity": ["error"],
"curly": ["error", "all"],
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
"no-implicit-coercion": ["error", { "boolean": false }],
"no-new-wrappers": ["error"],
"no-new-object": ["error"],
"new-cap": ["error", { "newIsCap": false, "capIsNew": false }],
"no-array-constructor": ["error"],
"max-params": ["error", 5],
"max-lines": ["error", 500],
"max-statements": ["error", 50],
"one-var": ["error", "never"],
"max-nested-callbacks": ["error", 3],
"no-negated-condition": "error",
"no-case-declarations": 0,
"class-methods-use-this": 0,
"no-param-reassign": 0,
"no-use-before-define": 0,
"no-plusplus": 0,
"no-console": 0,
"prefer-destructuring": 0,
"consistent-return": 0,
"guard-for-in": 0,
"max-classes-per-file": 0,
"@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
"import/no-named-as-default-member": ["off"],
"import/first": ["warn"],
"import/no-duplicates": ["warn"],
"import/order": ["warn"],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": true }],
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-explicit-any": 0,
"prettier/prettier": "warn"
},
"overrides": [
{
"files": ["webpack.config.ts"],
"env": {
"browser": false,
"node": true
}
},
{
"files": ["src/**/*{.,-}{spec,it}.ts"],
"env": {
"jest": true
},
"rules": {
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/unbound-method": 0,
"@typescript-eslint/no-empty-function": 0,
"max-lines": ["error", 1200]
}
}
]
}