-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.eslintrc.json
More file actions
221 lines (221 loc) · 8.01 KB
/
.eslintrc.json
File metadata and controls
221 lines (221 loc) · 8.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
{
"root": true,
"env": {
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2021
},
"plugins": ["@typescript-eslint", "@stylistic", "mocha", "n"],
"rules": {
"no-restricted-globals": [
"error",
"name",
"close",
"history",
"length",
"open",
"parent",
"scroll",
"self",
"stop",
"event",
{
"name": "parseInt",
"message": "Use 'Number()' instead of 'parseInt'."
},
{
"name": "parseFloat",
"message": "Use 'Number()' instead of 'parseFloat'."
}
],
"@stylistic/member-delimiter-style": ["off"],
"@stylistic/indent": ["off"],
"@stylistic/semi": ["error", "always"],
"@stylistic/comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/ban-tslint-comment": "warn",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/prefer-promise-reject-errors": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"arguments": false,
"returns": false,
"properties": false
}
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": "off",
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/prefer-as-const": "off",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@stylistic/array-bracket-spacing": ["error", "always", { "objectsInArrays": false }],
"@stylistic/arrow-parens": ["off", "always"],
"@stylistic/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"@stylistic/comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": ["error", "multi-line"],
"eqeqeq": ["error", "smart"],
"guard-for-in": "error",
"id-denylist": "error",
"id-match": "error",
"max-classes-per-file": "off",
"@stylistic/space-infix-ops": ["error", { "int32Hint": false }],
"@stylistic/max-len": [
"error",
{
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"code": 120,
"ignorePattern": "^\\s*[/][/*]\\s*eslint-disable-next-line"
}
],
"@stylistic/new-parens": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "off",
"no-constant-binary-expression": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-debugger": "error",
"no-empty": "error",
"no-eval": "error",
"no-fallthrough": ["error", { "commentPattern": "break[\\s\\w]*omitted" }],
"no-invalid-this": "off",
"no-irregular-whitespace": "error",
"no-inner-declarations": "off",
"no-new-object": "error",
"no-array-constructor": "error",
"no-iterator": "error",
"no-new-wrappers": "error",
"no-shadow": "off",
"no-async-promise-executor": "off",
"no-throw-literal": "error",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/no-mixed-spaces-and-tabs": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-use-before-define": "off",
"no-var": "warn",
"object-shorthand": "off",
"one-var": ["error", "never"],
"prefer-rest-params": "error",
"quotes": "off",
"no-bitwise": "error",
"radix": "error",
"@stylistic/spaced-comment": [
"error",
"always",
{
"line": { "exceptions": [], "markers": ["/"] },
"block": { "balanced": true, "exceptions": ["*"] }
}
],
"@stylistic/type-generic-spacing": ["error"],
"@stylistic/type-named-tuple-spacing": ["error"],
"use-isnan": "error",
"valid-typeof": "off",
"no-useless-escape": "off",
"mocha/no-setup-in-describe": "off",
"mocha/no-async-describe": "off",
"mocha/no-exclusive-tests": "error",
"mocha/no-skipped-tests": "error",
"mocha/no-identical-title": "off",
"mocha/no-mocha-arrows": "off",
"mocha/consistent-spacing-between-blocks": "off",
"mocha/no-exports": "off",
"n/no-unsupported-features/es-builtins": [
"error",
{
"version": ">=16.0.0",
"ignores": []
}
],
"n/no-unsupported-features/node-builtins": [
"error",
{
"version": ">=16.0.0",
"ignores": []
}
]
}
}