-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
216 lines (216 loc) · 6.55 KB
/
.eslintrc
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
{
"extends": [
"eslint:recommended",
"plugin:unicorn/recommended",
"plugin:import/recommended",
"plugin:promise/recommended",
"plugin:sonarjs/recommended",
"plugin:eslint-comments/recommended",
"plugin:jsdoc/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"import",
"prettier",
"@typescript-eslint",
"prefer-arrow",
"eslint-plugin-tsdoc"
],
"root": true,
"rules": {
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": "error",
"arrow-body-style": ["error", "always"],
"arrow-parens": ["error", "always"],
"arrow-spacing": [
"error",
{
"before": true,
"after": true
}
],
"brace-style": ["error", "1tbs"],
"camelcase": "off",
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"dot-location": ["error", "property"],
"eol-last": ["error", "always"],
"eqeqeq": "error",
"eslint-comments/disable-enable-pair": ["warn", { "allowWholeFile": true }],
"func-call-spacing": ["error", "never"],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-deprecated": "error",
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/no-mutable-exports": "error",
"import/no-unresolved": "error",
"import/order": [
"error",
{
"alphabetize": { "order": "asc", "caseInsensitive": true },
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always",
"pathGroups": [
{ "pattern": "#*/**", "group": "internal", "position": "after" }
]
}
],
"import/prefer-default-export": "off",
"jsdoc/require-param": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-type": "off",
"line-comment-position": ["error", { "position": "above" }],
"linebreak-style": ["error", "unix"],
"max-depth": ["error", 3],
"max-statements-per-line": ["error", { "max": 1 }],
"multiline-comment-style": ["error", "starred-block"],
"no-alert": "error",
"no-caller": "error",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-empty-function": "error",
"no-empty-static-block": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-inline-comments": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-mixed-operators": "error",
"no-multi-assign": "error",
"no-multi-str": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": ["error", { "props": true }],
"no-proto": "error",
"no-script-url": "error",
"no-sequences": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-underscore-dangle": "error",
"no-unneeded-ternary": "error",
"no-useless-computed-key": "error",
"no-var": "error",
"object-curly-spacing": [
"error",
"always",
{
"arraysInObjects": false,
"objectsInObjects": false
}
],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": ["break", "continue", "return", "block-like"]
},
{
"blankLine": "never",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
},
{
"blankLine": "always",
"prev": ["const", "let", "var"],
"next": ["block-like", "expression"]
},
{
"blankLine": "always",
"prev": ["block-like", "expression"],
"next": ["const", "let", "var"]
},
{ "blankLine": "always", "prev": "block-like", "next": "*" }
],
"prefer-arrow-callback": "error",
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"prefer-const": "error",
"prefer-destructuring": [
"warn",
{
"AssignmentExpression": { "array": true, "object": false },
"VariableDeclarator": { "array": false, "object": true }
},
{ "enforceForRenamedProperties": false }
],
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": false }],
"prefer-template": "error",
"require-await": "error",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"sort-imports": [
"warn",
{
"allowSeparatedGroups": false,
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "single", "multiple"]
}
],
"tsdoc/syntax": "warn",
"unicorn/filename-case": ["error", { "case": "camelCase" }],
"unicorn/no-nested-ternary": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/number-literal-case": "off",
"unicorn/prefer-logical-operator-over-ternary": "off",
"unicorn/prevent-abbreviations": [
"warn",
{ "allowList": { "params": true } }
],
"yoda": "error"
},
"settings": {
"import/parser": { "@typescript-eslint/parser": [".ts"] },
"import/resolver": {
"eslint-import-resolver-custom-alias": {
"alias": { "#src": "./src" },
"extensions": [".ts"]
},
"node": { "project": ["tsconfig.json"] },
"typescript": { "alwaysTryTypes": true, "project": ["tsconfig.json"] }
}
}
}