-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathts-for-js.json
222 lines (203 loc) · 7 KB
/
ts-for-js.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
216
217
218
219
220
221
222
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"sort-class-members",
"decorator-position",
"@shopify",
"etc",
"typescript-compat"
],
"rules": {
"require-await": "off",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/return-await": ["error", "always"],
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error",
"prefer-promise-reject-errors": "off",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"no-void": ["error", { "allowAsStatement": true }],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [
"error",
{ "allowComparingNullableBooleansToTrue": false }
],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowAny": true,
"allowNumber": true,
"allowBoolean": false,
"allowNullish": false,
"allowRegExp": false
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["strictCamelCase"]
},
{
"selector": ["function", "import"],
"format": ["strictCamelCase", "StrictPascalCase"]
},
{
"selector": ["typeLike", "enumMember"],
"format": ["StrictPascalCase"]
},
{
"selector": ["variable", "parameter", "accessor"],
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "has", "are", "can", "should", "did", "will"]
},
{
"selector": ["objectLiteralProperty"],
"format": null,
"modifiers": ["requiresQuotes"]
},
{
"selector": ["property"],
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "has", "are", "can", "should", "did", "will"],
"filter": {
"regex": "^(allowfullscreen|allowFullScreen|async|autofocus|autoFocus|autoplay|autoPlay|checked|defaultChecked|contenteditable|contentEditable|controls|default|defer|disabled|draggable|formnovalidate|formNoValidate|hidden|inert|ismap|itemscope|itemScope|loop|multiple|muted|nomodule|noModule|novalidate|noValidate|open|playsinline|playsInline|readonly|readOnly|required|reversed|selected|spellcheck|spellCheck)$",
"match": false
}
}
],
"sort-class-members/sort-class-members": [
"error",
{
"groups": {
"static-arrow-function-properties": [
{
"static": true,
"propertyType": "ArrowFunctionExpression",
"sort": "alphabetical"
}
],
"static-async-methods": [
{
"static": true,
"type": "method",
"async": true,
"sort": "alphabetical"
}
],
"static-accessor-pairs": [
{ "static": true, "accessorPair": true, "sort": "alphabetical" }
],
"static-getters": [
{ "static": true, "kind": "get", "sort": "alphabetical" }
],
"static-setters": [
{ "static": true, "kind": "set", "sort": "alphabetical" }
],
"static-conventional-private-properties": [
{
"static": true,
"type": "property",
"name": "/_.+/",
"sort": "alphabetical"
}
],
"static-conventional-private-methods": [
{
"static": true,
"type": "method",
"name": "/_.+/",
"sort": "alphabetical"
}
],
"static-async-conventional-private-methods": [
{
"static": true,
"type": "method",
"name": "/_.+/",
"async": true,
"sort": "alphabetical"
}
],
"async-conventional-private-methods": [
{
"type": "method",
"name": "/_.+/",
"async": true,
"sort": "alphabetical"
}
]
},
"order": [
"[static-properties]",
"[static-arrow-function-properties]",
"[static-accessor-pairs]",
"[static-getters]",
"[static-setters]",
"[static-methods]",
"[static-async-methods]",
"[properties]",
"[arrow-function-properties]",
"constructor",
"[accessor-pairs]",
"[getters]",
"[setters]",
"[methods]",
"[async-methods]",
"[static-conventional-private-properties]",
"[static-conventional-private-methods]",
"[static-async-conventional-private-methods]",
"[conventional-private-properties]",
"[conventional-private-methods]",
"[async-conventional-private-methods]"
],
"accessorPairPositioning": "getThenSet"
}
],
"decorator-position/decorator-position": "error",
"@shopify/prefer-class-properties": "error",
"@shopify/no-fully-static-classes": "error",
"etc/no-assign-mutated-array": "error",
"etc/no-commented-out-code": "error",
"etc/no-internal": "error",
"import/no-deprecated": "off",
"etc/no-deprecated": "error",
"typescript-compat/compat": "error",
"sonar/argument-type": "off",
"sonar/no-associative-arrays": "off",
"sonar/no-invalid-await": "off",
"sonar/operation-returning-nan": "off",
"sonar/values-not-convertible-to-numbers": "off",
"sonar/class-prototype": "off",
"sonar/no-for-in-iterable": "off",
"sonar/non-number-in-arithmetic-expression": "off",
"sonar/null-dereference": "off",
"sonar/in-operator-type-error": "off",
"sonar/no-incorrect-string-concat": "off",
"sonar/no-misleading-array-reverse": "off",
"react/sort-comp": "off"
}
}