-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
215 lines (210 loc) · 6.93 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
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["tsconfig.json", "tsconfig.test.json"],
"ecmaVersion": 2022,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"eslint-plugin-tsdoc",
"unicorn",
"eslint-plugin-array-func",
"import"
],
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true,
"es2022": true
},
"overrides": [
{
"files": [
"test/**/*.ts"
],
"env": {
"jest": true
},
"extends": ["plugin:jest/all"],
"plugins": ["jest"],
"rules": {
"id-length": "off",
"jest/max-expects": "off",
"jest/no-disabled-tests": "warn",
"jest/prefer-spy-on": "off",
"jest/prefer-expect-assertions": "off",
"jest/no-hooks": "off",
"jest/require-hook": "off",
"jest/consistent-test-it": ["error", {"fn": "test", "withinDescribe": "test"}],
"multiline-comment-style": "off",
"@typescript-eslint/prefer-destructuring": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/await-thenable": "off",
"max-lines-per-function": "off",
"object-property-newline": "off",
"complexity": ["error", { "max": 20 }],
"unicorn/no-null": "off",
"jsdoc/require-jsdoc": "off"
}
}
],
"extends": [
"eslint:all",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/all",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:unicorn/all",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:eslint-plugin-array-func/recommended",
"plugin:jsdoc/recommended-typescript-error"
],
"rules": {
"no-new": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/class-methods-use-this": "off",
"no-underscore-dangle": "off",
"id-length": ["error", {"exceptions": ["x", "y", "i", "j", "c"]}],
"jsdoc/require-jsdoc": ["error", {"contexts":["TSTypeAliasDeclaration","TSInterfaceDeclaration","TSPropertySignature"],"publicOnly":{"ancestorsOnly":true},"require":{"ClassDeclaration":true,"ClassExpression":true}}],
"jsdoc/sort-tags": "error",
"jsdoc/no-bad-blocks": "error",
"jsdoc/check-tag-names": ["error", {"definedTags": ["typeParam", "category"]}],
"tsdoc/syntax": "error",
"import/no-deprecated": "error",
"import/no-empty-named-blocks": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-absolute-path": "error",
"import/no-useless-path-segments": "error",
"import/no-self-import": "error",
"import/no-restricted-paths": ["error", { "zones": [ {
"target": "./src/api",
"from": "./src/impl"
}]}],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/exports-last": "error",
"import/order": [
"error",
{
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": [
"index",
"sibling",
"parent",
"internal",
"external",
"builtin",
"object",
"type"
]
}
],
"import/no-unassigned-import": "error",
"import/newline-after-import": "error",
"import/first": "error",
"unicorn/switch-case-braces": "off",
"unicorn/no-thenable": "off",
"no-duplicate-imports": "off",
"func-style": "off",
"max-lines": "off",
"prefer-destructuring": "off",
"no-lonely-if": "off",
"capitalized-comments": "off",
"no-plusplus": "off",
"no-extra-parens": "off",
"dot-location": "off",
"sort-keys": "off",
"array-element-newline": "off",
"function-paren-newline": "off",
"max-params": "off",
"no-ternary": "off",
"multiline-ternary": "off",
"max-classes-per-file": "off",
"max-statements": "off",
"init-declarations": "off",
"keyword-spacing": "off",
"space-before-function-paren": "off",
"function-call-argument-newline": "off",
"no-mixed-operators": "off",
"lines-between-class-members": "off",
"no-unused-expressions": "off",
"no-undefined": "off",
"padded-blocks": "off",
"lines-around-comment": "off",
"sort-imports": "off",
"no-magic-numbers": "off",
"indent": "off",
"@typescript-eslint/max-params": "off",
"@typescript-eslint/block-spacing": "off",
"@typescript-eslint/lines-around-comment": "off",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/method-signature-style": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/array-type": ["error", { "default": "generic"}],
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }],
"@typescript-eslint/indent": ["error", 4, {
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" },
"SwitchCase": 1
}],
"@typescript-eslint/prefer-nullish-coalescing": ["error",
{"ignoreMixedLogicalExpressions" : false, "ignoreConditionalTests": false}],
"@typescript-eslint/quotes": [
"error",
"double"
],
"multiline-comment-style": ["error", "starred-block"],
"arrow-parens": ["error", "as-needed"],
"complexity": ["error", { "max": 10 }],
"eqeqeq": ["error", "smart"],
"max-len": ["error", { "code": 150 }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-restricted-syntax": ["error", "ForInStatement"],
"one-var": ["error", "never"],
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": [
"error",
{
"cases": {
"camelCase": true,
"pascalCase": true
},
"ignore": [
".*FSM.*",
".*SVG.*",
".*HTML.*"
]
}
],
"unicorn/no-useless-undefined": "off",
"unicorn/consistent-function-scoping": [
"error",
{
"checkArrowFunctions": false
}
],
"unicorn/no-keyword-prefix": "off",
"unicorn/prefer-spread": "off"
}
}