-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslintrc.json
196 lines (193 loc) · 7.08 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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:promise/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": ["./tsconfig.json", "./tsconfig.test.json"]
},
"plugins": ["@typescript-eslint/eslint-plugin", "import", "promise"],
"rules": {
"no-console": ["error"],
"no-extra-parens": ["off"],
"no-import-assign": ["error"],
"no-template-curly-in-string": ["error"],
"curly": ["error", "all"],
"eqeqeq": ["error"],
"max-classes-per-file": ["error", 1],
"no-alert": ["error"],
"no-caller": ["error"],
"no-div-regex": ["error"],
"no-else-return": ["error", { "allowElseIf": false }],
"no-eq-null": ["error"],
"no-eval": ["error"],
"no-extend-native": ["error"],
"no-extra-bind": ["error"],
"no-extra-label": ["error"],
"no-floating-decimal": ["error"],
"no-implicit-coercion": ["error"],
"no-implicit-globals": ["error"],
"no-implied-eval": ["error"],
"no-invalid-this": ["error"],
"no-iterator": ["error"],
"no-labels": ["error"],
"no-lone-blocks": ["error"],
"no-loop-func": ["error"],
"no-multi-spaces": ["error"],
"no-multi-str": ["error"],
"no-new": ["error"],
"no-new-func": ["error"],
"no-new-wrappers": ["error"],
"no-octal-escape": ["error"],
"no-param-reassign": ["error"],
"no-proto": ["error"],
"no-return-assign": ["error", "always"],
"no-return-await": ["error"],
"no-script-url": ["error"],
"no-self-compare": ["error"],
"no-sequences": ["error"],
"no-throw-literal": ["error"],
"no-unmodified-loop-condition": ["error"],
"no-useless-call": ["error"],
"no-useless-concat": ["error"],
"no-useless-return": ["error"],
"prefer-named-capture-group": ["error"],
"prefer-promise-reject-errors": ["error"],
"prefer-regex-literals": ["error"],
"radix": ["error", "always"],
"require-unicode-regexp": ["error"],
"wrap-iife": ["error", "inside"],
"yoda": ["error", "never"],
"array-bracket-spacing": ["error", "never"],
"brace-style": ["error"],
"camelcase": ["error"],
"func-call-spacing": ["error"],
"no-lonely-if": ["error"],
"no-nested-ternary": ["error"],
"no-new-object": ["error"],
"no-trailing-spaces": ["error"],
"semi-spacing": ["error", { "before": false, "after": true }],
"promise/prefer-await-to-then": ["error"],
"promise/prefer-await-to-callbacks": ["error"],
"promise/param-names": ["off"],
"import/exports-last": ["error"],
"import/extensions": ["error"],
"import/first": ["error"],
"import/named": ["off"],
"import/newline-after-import": ["error"],
"import/no-unassigned-import": ["error"],
"import/no-named-default": ["error"],
"import/no-default-export": ["error"],
"@typescript-eslint/array-type": [
"error",
{ "default": "array-simple" }
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": false,
"allowTypedFunctionExpressions": false,
"allowHigherOrderFunctions": false
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "explicit" }
],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"signature",
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-abstract-field",
"protected-abstract-field",
"private-abstract-field",
"public-constructor",
"protected-constructor",
"private-constructor",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method",
"public-abstract-method",
"protected-abstract-method",
"private-abstract-method"
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeLike",
"format": ["StrictPascalCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "variableLike",
"format": ["strictCamelCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "parameter",
"format": ["strictCamelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "forbid"
},
{
"selector": "memberLike",
"format": ["strictCamelCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "property",
"modifiers": ["static", "readonly"],
"format": ["UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "enumMember",
"format": ["StrictPascalCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-extra-parens": [
"error",
"all",
{ "enforceForArrowConditionals": false }
],
"@typescript-eslint/prefer-for-of": ["error"],
"@typescript-eslint/prefer-readonly": ["error"],
"@typescript-eslint/promise-function-async": ["error"],
"@typescript-eslint/restrict-plus-operands": ["error"],
"@typescript-eslint/strict-boolean-expressions": ["error"],
"@typescript-eslint/unified-signatures": ["error"]
}
}