@biomejs/biome 0.1.0-nightly.54e85a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/bin/biome +67 -0
- package/configuration_schema.json +1706 -0
- package/package.json +1 -0
- package/scripts/postinstall.js +34 -0
|
@@ -0,0 +1,1706 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Configuration",
|
|
4
|
+
"description": "The configuration that is contained inside the file `rome.json`",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"description": "A field for the [JSON schema](https://json-schema.org/) specification",
|
|
9
|
+
"type": ["string", "null"]
|
|
10
|
+
},
|
|
11
|
+
"extends": {
|
|
12
|
+
"description": "A list of paths to other JSON files, used to extends the current configuration.",
|
|
13
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
14
|
+
},
|
|
15
|
+
"files": {
|
|
16
|
+
"description": "The configuration of the filesystem",
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{ "$ref": "#/definitions/FilesConfiguration" },
|
|
19
|
+
{ "type": "null" }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"formatter": {
|
|
23
|
+
"description": "The configuration of the formatter",
|
|
24
|
+
"anyOf": [
|
|
25
|
+
{ "$ref": "#/definitions/FormatterConfiguration" },
|
|
26
|
+
{ "type": "null" }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"javascript": {
|
|
30
|
+
"description": "Specific configuration for the JavaScript language",
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{ "$ref": "#/definitions/JavascriptConfiguration" },
|
|
33
|
+
{ "type": "null" }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"json": {
|
|
37
|
+
"description": "Specific configuration for the Json language",
|
|
38
|
+
"anyOf": [
|
|
39
|
+
{ "$ref": "#/definitions/JsonConfiguration" },
|
|
40
|
+
{ "type": "null" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"linter": {
|
|
44
|
+
"description": "The configuration for the linter",
|
|
45
|
+
"anyOf": [
|
|
46
|
+
{ "$ref": "#/definitions/LinterConfiguration" },
|
|
47
|
+
{ "type": "null" }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"organizeImports": {
|
|
51
|
+
"description": "The configuration of the import sorting",
|
|
52
|
+
"anyOf": [{ "$ref": "#/definitions/OrganizeImports" }, { "type": "null" }]
|
|
53
|
+
},
|
|
54
|
+
"vcs": {
|
|
55
|
+
"description": "The configuration of the VCS integration",
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{ "$ref": "#/definitions/VcsConfiguration" },
|
|
58
|
+
{ "type": "null" }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"definitions": {
|
|
64
|
+
"A11y": {
|
|
65
|
+
"description": "A list of rules that belong to this group",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"all": {
|
|
69
|
+
"description": "It enables ALL rules for this group.",
|
|
70
|
+
"type": ["boolean", "null"]
|
|
71
|
+
},
|
|
72
|
+
"noAccessKey": {
|
|
73
|
+
"description": "Enforce that the accessKey attribute is not used on any HTML element.",
|
|
74
|
+
"anyOf": [
|
|
75
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
76
|
+
{ "type": "null" }
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"noAutofocus": {
|
|
80
|
+
"description": "Enforce that autoFocus prop is not used on elements.",
|
|
81
|
+
"anyOf": [
|
|
82
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
83
|
+
{ "type": "null" }
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"noBlankTarget": {
|
|
87
|
+
"description": "Disallow target=\"_blank\" attribute without rel=\"noreferrer\"",
|
|
88
|
+
"anyOf": [
|
|
89
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
90
|
+
{ "type": "null" }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"noDistractingElements": {
|
|
94
|
+
"description": "Enforces that no distracting elements are used.",
|
|
95
|
+
"anyOf": [
|
|
96
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
97
|
+
{ "type": "null" }
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"noHeaderScope": {
|
|
101
|
+
"description": "The scope prop should be used only on <th> elements.",
|
|
102
|
+
"anyOf": [
|
|
103
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
104
|
+
{ "type": "null" }
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"noNoninteractiveElementToInteractiveRole": {
|
|
108
|
+
"description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.",
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
111
|
+
{ "type": "null" }
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"noPositiveTabindex": {
|
|
115
|
+
"description": "Prevent the usage of positive integers on tabIndex property",
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
118
|
+
{ "type": "null" }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"noRedundantAlt": {
|
|
122
|
+
"description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".",
|
|
123
|
+
"anyOf": [
|
|
124
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
125
|
+
{ "type": "null" }
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"noSvgWithoutTitle": {
|
|
129
|
+
"description": "Enforces the usage of the title element for the svg element.",
|
|
130
|
+
"anyOf": [
|
|
131
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
132
|
+
{ "type": "null" }
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"recommended": {
|
|
136
|
+
"description": "It enables the recommended rules for this group",
|
|
137
|
+
"type": ["boolean", "null"]
|
|
138
|
+
},
|
|
139
|
+
"useAltText": {
|
|
140
|
+
"description": "Enforce that all elements that require alternative text have meaningful information to relay back to the end user.",
|
|
141
|
+
"anyOf": [
|
|
142
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
143
|
+
{ "type": "null" }
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"useAnchorContent": {
|
|
147
|
+
"description": "Enforce that anchors have content and that the content is accessible to screen readers.",
|
|
148
|
+
"anyOf": [
|
|
149
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
150
|
+
{ "type": "null" }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
"useAriaPropsForRole": {
|
|
154
|
+
"description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.",
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
157
|
+
{ "type": "null" }
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"useButtonType": {
|
|
161
|
+
"description": "Enforces the usage of the attribute type for the element button",
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
164
|
+
{ "type": "null" }
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"useHeadingContent": {
|
|
168
|
+
"description": "Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop.",
|
|
169
|
+
"anyOf": [
|
|
170
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
171
|
+
{ "type": "null" }
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"useHtmlLang": {
|
|
175
|
+
"description": "Enforce that html element has lang attribute.",
|
|
176
|
+
"anyOf": [
|
|
177
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
178
|
+
{ "type": "null" }
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"useIframeTitle": {
|
|
182
|
+
"description": "Enforces the usage of the attribute title for the element iframe.",
|
|
183
|
+
"anyOf": [
|
|
184
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
185
|
+
{ "type": "null" }
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"useKeyWithClickEvents": {
|
|
189
|
+
"description": "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.",
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
192
|
+
{ "type": "null" }
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"useKeyWithMouseEvents": {
|
|
196
|
+
"description": "Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.",
|
|
197
|
+
"anyOf": [
|
|
198
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
199
|
+
{ "type": "null" }
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"useMediaCaption": {
|
|
203
|
+
"description": "Enforces that audio and video elements must have a track for captions.",
|
|
204
|
+
"anyOf": [
|
|
205
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
206
|
+
{ "type": "null" }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"useValidAnchor": {
|
|
210
|
+
"description": "Enforce that all anchors are valid, and they are navigable elements.",
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
213
|
+
{ "type": "null" }
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"useValidAriaProps": {
|
|
217
|
+
"description": "Ensures that ARIA properties aria-* are all valid.",
|
|
218
|
+
"anyOf": [
|
|
219
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
220
|
+
{ "type": "null" }
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"useValidLang": {
|
|
224
|
+
"description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.",
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
227
|
+
{ "type": "null" }
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"ArrowParentheses": { "type": "string", "enum": ["always", "asNeeded"] },
|
|
233
|
+
"Complexity": {
|
|
234
|
+
"description": "A list of rules that belong to this group",
|
|
235
|
+
"type": "object",
|
|
236
|
+
"properties": {
|
|
237
|
+
"all": {
|
|
238
|
+
"description": "It enables ALL rules for this group.",
|
|
239
|
+
"type": ["boolean", "null"]
|
|
240
|
+
},
|
|
241
|
+
"noExtraBooleanCast": {
|
|
242
|
+
"description": "Disallow unnecessary boolean casts",
|
|
243
|
+
"anyOf": [
|
|
244
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
245
|
+
{ "type": "null" }
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"noForEach": {
|
|
249
|
+
"description": "Prefer for...of statement instead of Array.forEach.",
|
|
250
|
+
"anyOf": [
|
|
251
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
252
|
+
{ "type": "null" }
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"noMultipleSpacesInRegularExpressionLiterals": {
|
|
256
|
+
"description": "Disallow unclear usage of multiple space characters in regular expression literals",
|
|
257
|
+
"anyOf": [
|
|
258
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
259
|
+
{ "type": "null" }
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"noUselessCatch": {
|
|
263
|
+
"description": "Disallow unnecessary catch clauses.",
|
|
264
|
+
"anyOf": [
|
|
265
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
266
|
+
{ "type": "null" }
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"noUselessConstructor": {
|
|
270
|
+
"description": "Disallow unnecessary constructors.",
|
|
271
|
+
"anyOf": [
|
|
272
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
273
|
+
{ "type": "null" }
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"noUselessFragments": {
|
|
277
|
+
"description": "Disallow unnecessary fragments",
|
|
278
|
+
"anyOf": [
|
|
279
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
280
|
+
{ "type": "null" }
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"noUselessLabel": {
|
|
284
|
+
"description": "Disallow unnecessary labels.",
|
|
285
|
+
"anyOf": [
|
|
286
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
287
|
+
{ "type": "null" }
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"noUselessRename": {
|
|
291
|
+
"description": "Disallow renaming import, export, and destructured assignments to the same name.",
|
|
292
|
+
"anyOf": [
|
|
293
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
294
|
+
{ "type": "null" }
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"noUselessSwitchCase": {
|
|
298
|
+
"description": "Disallow useless case in switch statements.",
|
|
299
|
+
"anyOf": [
|
|
300
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
301
|
+
{ "type": "null" }
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
"noUselessTypeConstraint": {
|
|
305
|
+
"description": "Disallow using any or unknown as type constraint.",
|
|
306
|
+
"anyOf": [
|
|
307
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
308
|
+
{ "type": "null" }
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"noWith": {
|
|
312
|
+
"description": "Disallow with statements in non-strict contexts.",
|
|
313
|
+
"anyOf": [
|
|
314
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
315
|
+
{ "type": "null" }
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
"recommended": {
|
|
319
|
+
"description": "It enables the recommended rules for this group",
|
|
320
|
+
"type": ["boolean", "null"]
|
|
321
|
+
},
|
|
322
|
+
"useFlatMap": {
|
|
323
|
+
"description": "Promotes the use of .flatMap() when map().flat() are used together.",
|
|
324
|
+
"anyOf": [
|
|
325
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
326
|
+
{ "type": "null" }
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
"useLiteralKeys": {
|
|
330
|
+
"description": "Enforce the usage of a literal access to properties over computed property access.",
|
|
331
|
+
"anyOf": [
|
|
332
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
333
|
+
{ "type": "null" }
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
"useOptionalChain": {
|
|
337
|
+
"description": "Enforce using concise optional chain instead of chained logical expressions.",
|
|
338
|
+
"anyOf": [
|
|
339
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
340
|
+
{ "type": "null" }
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"useSimpleNumberKeys": {
|
|
344
|
+
"description": "Disallow number literal object member names which are not base10 or uses underscore as separator",
|
|
345
|
+
"anyOf": [
|
|
346
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
347
|
+
{ "type": "null" }
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"useSimplifiedLogicExpression": {
|
|
351
|
+
"description": "Discard redundant terms from logical expressions.",
|
|
352
|
+
"anyOf": [
|
|
353
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
354
|
+
{ "type": "null" }
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"ComplexityOptions": {
|
|
360
|
+
"description": "Options for the rule `noNestedModuleImports`.",
|
|
361
|
+
"type": "object",
|
|
362
|
+
"required": ["maxAllowedComplexity"],
|
|
363
|
+
"properties": {
|
|
364
|
+
"maxAllowedComplexity": {
|
|
365
|
+
"description": "The maximum complexity score that we allow. Anything higher is considered excessive.",
|
|
366
|
+
"type": "integer",
|
|
367
|
+
"format": "uint8",
|
|
368
|
+
"minimum": 0.0
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"additionalProperties": false
|
|
372
|
+
},
|
|
373
|
+
"Correctness": {
|
|
374
|
+
"description": "A list of rules that belong to this group",
|
|
375
|
+
"type": "object",
|
|
376
|
+
"properties": {
|
|
377
|
+
"all": {
|
|
378
|
+
"description": "It enables ALL rules for this group.",
|
|
379
|
+
"type": ["boolean", "null"]
|
|
380
|
+
},
|
|
381
|
+
"noChildrenProp": {
|
|
382
|
+
"description": "Prevent passing of children as props.",
|
|
383
|
+
"anyOf": [
|
|
384
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
385
|
+
{ "type": "null" }
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
"noConstAssign": {
|
|
389
|
+
"description": "Prevents from having const variables being re-assigned.",
|
|
390
|
+
"anyOf": [
|
|
391
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
392
|
+
{ "type": "null" }
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
"noConstructorReturn": {
|
|
396
|
+
"description": "Disallow returning a value from a constructor.",
|
|
397
|
+
"anyOf": [
|
|
398
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
399
|
+
{ "type": "null" }
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"noEmptyPattern": {
|
|
403
|
+
"description": "Disallows empty destructuring patterns.",
|
|
404
|
+
"anyOf": [
|
|
405
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
406
|
+
{ "type": "null" }
|
|
407
|
+
]
|
|
408
|
+
},
|
|
409
|
+
"noGlobalObjectCalls": {
|
|
410
|
+
"description": "Disallow calling global object properties as functions",
|
|
411
|
+
"anyOf": [
|
|
412
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
413
|
+
{ "type": "null" }
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
"noInnerDeclarations": {
|
|
417
|
+
"description": "Disallow function and var declarations that are accessible outside their block.",
|
|
418
|
+
"anyOf": [
|
|
419
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
420
|
+
{ "type": "null" }
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
"noInvalidConstructorSuper": {
|
|
424
|
+
"description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.",
|
|
425
|
+
"anyOf": [
|
|
426
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
427
|
+
{ "type": "null" }
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"noNewSymbol": {
|
|
431
|
+
"description": "Disallow new operators with the Symbol object.",
|
|
432
|
+
"anyOf": [
|
|
433
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
434
|
+
{ "type": "null" }
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"noPrecisionLoss": {
|
|
438
|
+
"description": "Disallow literal numbers that lose precision",
|
|
439
|
+
"anyOf": [
|
|
440
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
441
|
+
{ "type": "null" }
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
"noRenderReturnValue": {
|
|
445
|
+
"description": "Prevent the usage of the return value of React.render.",
|
|
446
|
+
"anyOf": [
|
|
447
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
448
|
+
{ "type": "null" }
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
"noSetterReturn": {
|
|
452
|
+
"description": "Disallow returning a value from a setter",
|
|
453
|
+
"anyOf": [
|
|
454
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
455
|
+
{ "type": "null" }
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
"noStringCaseMismatch": {
|
|
459
|
+
"description": "Disallow comparison of expressions modifying the string case with non-compliant value.",
|
|
460
|
+
"anyOf": [
|
|
461
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
462
|
+
{ "type": "null" }
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
"noSwitchDeclarations": {
|
|
466
|
+
"description": "Disallow lexical declarations in switch clauses.",
|
|
467
|
+
"anyOf": [
|
|
468
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
469
|
+
{ "type": "null" }
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
"noUndeclaredVariables": {
|
|
473
|
+
"description": "Prevents the usage of variables that haven't been declared inside the document.",
|
|
474
|
+
"anyOf": [
|
|
475
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
476
|
+
{ "type": "null" }
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"noUnnecessaryContinue": {
|
|
480
|
+
"description": "Avoid using unnecessary continue.",
|
|
481
|
+
"anyOf": [
|
|
482
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
483
|
+
{ "type": "null" }
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
"noUnreachable": {
|
|
487
|
+
"description": "Disallow unreachable code",
|
|
488
|
+
"anyOf": [
|
|
489
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
490
|
+
{ "type": "null" }
|
|
491
|
+
]
|
|
492
|
+
},
|
|
493
|
+
"noUnreachableSuper": {
|
|
494
|
+
"description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass",
|
|
495
|
+
"anyOf": [
|
|
496
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
497
|
+
{ "type": "null" }
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
"noUnsafeFinally": {
|
|
501
|
+
"description": "Disallow control flow statements in finally blocks.",
|
|
502
|
+
"anyOf": [
|
|
503
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
504
|
+
{ "type": "null" }
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
"noUnsafeOptionalChaining": {
|
|
508
|
+
"description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.",
|
|
509
|
+
"anyOf": [
|
|
510
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
511
|
+
{ "type": "null" }
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
"noUnusedLabels": {
|
|
515
|
+
"description": "Disallow unused labels.",
|
|
516
|
+
"anyOf": [
|
|
517
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
518
|
+
{ "type": "null" }
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"noUnusedVariables": {
|
|
522
|
+
"description": "Disallow unused variables.",
|
|
523
|
+
"anyOf": [
|
|
524
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
525
|
+
{ "type": "null" }
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
"noVoidElementsWithChildren": {
|
|
529
|
+
"description": "This rules prevents void elements (AKA self-closing elements) from having children.",
|
|
530
|
+
"anyOf": [
|
|
531
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
532
|
+
{ "type": "null" }
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
"noVoidTypeReturn": {
|
|
536
|
+
"description": "Disallow returning a value from a function with the return type 'void'",
|
|
537
|
+
"anyOf": [
|
|
538
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
539
|
+
{ "type": "null" }
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
"recommended": {
|
|
543
|
+
"description": "It enables the recommended rules for this group",
|
|
544
|
+
"type": ["boolean", "null"]
|
|
545
|
+
},
|
|
546
|
+
"useIsNan": {
|
|
547
|
+
"description": "Require calls to isNaN() when checking for NaN.",
|
|
548
|
+
"anyOf": [
|
|
549
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
550
|
+
{ "type": "null" }
|
|
551
|
+
]
|
|
552
|
+
},
|
|
553
|
+
"useValidForDirection": {
|
|
554
|
+
"description": "Enforce \"for\" loop update clause moving the counter in the right direction.",
|
|
555
|
+
"anyOf": [
|
|
556
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
557
|
+
{ "type": "null" }
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
"useYield": {
|
|
561
|
+
"description": "Require generator functions to contain yield.",
|
|
562
|
+
"anyOf": [
|
|
563
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
564
|
+
{ "type": "null" }
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"EnumMemberCase": {
|
|
570
|
+
"description": "Supported cases for TypeScript `enum` member names.",
|
|
571
|
+
"oneOf": [
|
|
572
|
+
{
|
|
573
|
+
"description": "PascalCase",
|
|
574
|
+
"type": "string",
|
|
575
|
+
"enum": ["PascalCase"]
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"description": "CONSTANT_CASE",
|
|
579
|
+
"type": "string",
|
|
580
|
+
"enum": ["CONSTANT_CASE"]
|
|
581
|
+
},
|
|
582
|
+
{ "description": "camelCase", "type": "string", "enum": ["camelCase"] }
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
"FilesConfiguration": {
|
|
586
|
+
"description": "The configuration of the filesystem",
|
|
587
|
+
"type": "object",
|
|
588
|
+
"properties": {
|
|
589
|
+
"ignore": {
|
|
590
|
+
"description": "A list of Unix shell style patterns. Biome tools will ignore files/folders that will match these patterns.",
|
|
591
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
592
|
+
},
|
|
593
|
+
"ignoreUnknown": {
|
|
594
|
+
"description": "Tells Biome to not emit diagnostics when handling files that doesn't know",
|
|
595
|
+
"type": ["boolean", "null"]
|
|
596
|
+
},
|
|
597
|
+
"maxSize": {
|
|
598
|
+
"description": "The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB",
|
|
599
|
+
"default": null,
|
|
600
|
+
"type": ["integer", "null"],
|
|
601
|
+
"format": "uint64",
|
|
602
|
+
"minimum": 1.0
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"additionalProperties": false
|
|
606
|
+
},
|
|
607
|
+
"FormatterConfiguration": {
|
|
608
|
+
"description": "Generic options applied to all files",
|
|
609
|
+
"type": "object",
|
|
610
|
+
"properties": {
|
|
611
|
+
"enabled": { "default": true, "type": ["boolean", "null"] },
|
|
612
|
+
"formatWithErrors": {
|
|
613
|
+
"description": "Stores whether formatting should be allowed to proceed if a given file has syntax errors",
|
|
614
|
+
"default": false,
|
|
615
|
+
"type": ["boolean", "null"]
|
|
616
|
+
},
|
|
617
|
+
"ignore": {
|
|
618
|
+
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
619
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
620
|
+
},
|
|
621
|
+
"indentSize": {
|
|
622
|
+
"description": "The size of the indentation, 2 by default",
|
|
623
|
+
"default": 2,
|
|
624
|
+
"type": ["integer", "null"],
|
|
625
|
+
"format": "uint8",
|
|
626
|
+
"minimum": 0.0
|
|
627
|
+
},
|
|
628
|
+
"indentStyle": {
|
|
629
|
+
"description": "The indent style.",
|
|
630
|
+
"default": "tab",
|
|
631
|
+
"anyOf": [
|
|
632
|
+
{ "$ref": "#/definitions/PlainIndentStyle" },
|
|
633
|
+
{ "type": "null" }
|
|
634
|
+
]
|
|
635
|
+
},
|
|
636
|
+
"lineWidth": {
|
|
637
|
+
"description": "What's the max width of a line. Defaults to 80.",
|
|
638
|
+
"default": 80,
|
|
639
|
+
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"additionalProperties": false
|
|
643
|
+
},
|
|
644
|
+
"Hooks": {
|
|
645
|
+
"type": "object",
|
|
646
|
+
"required": ["name"],
|
|
647
|
+
"properties": {
|
|
648
|
+
"closureIndex": {
|
|
649
|
+
"description": "The \"position\" of the closure function, starting from zero.\n\n### Example",
|
|
650
|
+
"type": ["integer", "null"],
|
|
651
|
+
"format": "uint",
|
|
652
|
+
"minimum": 0.0
|
|
653
|
+
},
|
|
654
|
+
"dependenciesIndex": {
|
|
655
|
+
"description": "The \"position\" of the array of dependencies, starting from zero.",
|
|
656
|
+
"type": ["integer", "null"],
|
|
657
|
+
"format": "uint",
|
|
658
|
+
"minimum": 0.0
|
|
659
|
+
},
|
|
660
|
+
"name": { "description": "The name of the hook", "type": "string" }
|
|
661
|
+
},
|
|
662
|
+
"additionalProperties": false
|
|
663
|
+
},
|
|
664
|
+
"HooksOptions": {
|
|
665
|
+
"description": "Options for the rule `useExhaustiveDependencies` and `useHookAtTopLevel`",
|
|
666
|
+
"type": "object",
|
|
667
|
+
"required": ["hooks"],
|
|
668
|
+
"properties": {
|
|
669
|
+
"hooks": {
|
|
670
|
+
"description": "List of safe hooks",
|
|
671
|
+
"type": "array",
|
|
672
|
+
"items": { "$ref": "#/definitions/Hooks" }
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"additionalProperties": false
|
|
676
|
+
},
|
|
677
|
+
"JavascriptConfiguration": {
|
|
678
|
+
"description": "A set of options applied to the JavaScript files",
|
|
679
|
+
"type": "object",
|
|
680
|
+
"properties": {
|
|
681
|
+
"formatter": {
|
|
682
|
+
"description": "Formatting options",
|
|
683
|
+
"anyOf": [
|
|
684
|
+
{ "$ref": "#/definitions/JavascriptFormatter" },
|
|
685
|
+
{ "type": "null" }
|
|
686
|
+
]
|
|
687
|
+
},
|
|
688
|
+
"globals": {
|
|
689
|
+
"description": "A list of global bindings that should be ignored by the analyzers\n\nIf defined here, they should not emit diagnostics.",
|
|
690
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
691
|
+
},
|
|
692
|
+
"organize_imports": {
|
|
693
|
+
"anyOf": [
|
|
694
|
+
{ "$ref": "#/definitions/JavascriptOrganizeImports" },
|
|
695
|
+
{ "type": "null" }
|
|
696
|
+
]
|
|
697
|
+
},
|
|
698
|
+
"parser": {
|
|
699
|
+
"description": "Parsing options",
|
|
700
|
+
"anyOf": [
|
|
701
|
+
{ "$ref": "#/definitions/JavascriptParser" },
|
|
702
|
+
{ "type": "null" }
|
|
703
|
+
]
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"additionalProperties": false
|
|
707
|
+
},
|
|
708
|
+
"JavascriptFormatter": {
|
|
709
|
+
"description": "Formatting options specific to the JavaScript files",
|
|
710
|
+
"type": "object",
|
|
711
|
+
"properties": {
|
|
712
|
+
"arrowParentheses": {
|
|
713
|
+
"description": "Whether to add non-necessary parentheses to arrow functions. Defaults to \"always\".",
|
|
714
|
+
"anyOf": [
|
|
715
|
+
{ "$ref": "#/definitions/ArrowParentheses" },
|
|
716
|
+
{ "type": "null" }
|
|
717
|
+
]
|
|
718
|
+
},
|
|
719
|
+
"jsxQuoteStyle": {
|
|
720
|
+
"description": "The type of quotes used in JSX. Defaults to double.",
|
|
721
|
+
"anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }]
|
|
722
|
+
},
|
|
723
|
+
"quoteProperties": {
|
|
724
|
+
"description": "When properties in objects are quoted. Defaults to asNeeded.",
|
|
725
|
+
"anyOf": [
|
|
726
|
+
{ "$ref": "#/definitions/QuoteProperties" },
|
|
727
|
+
{ "type": "null" }
|
|
728
|
+
]
|
|
729
|
+
},
|
|
730
|
+
"quoteStyle": {
|
|
731
|
+
"description": "The type of quotes used in JavaScript code. Defaults to double.",
|
|
732
|
+
"anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }]
|
|
733
|
+
},
|
|
734
|
+
"semicolons": {
|
|
735
|
+
"description": "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.",
|
|
736
|
+
"anyOf": [{ "$ref": "#/definitions/Semicolons" }, { "type": "null" }]
|
|
737
|
+
},
|
|
738
|
+
"trailingComma": {
|
|
739
|
+
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"all\".",
|
|
740
|
+
"anyOf": [
|
|
741
|
+
{ "$ref": "#/definitions/TrailingComma" },
|
|
742
|
+
{ "type": "null" }
|
|
743
|
+
]
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"additionalProperties": false
|
|
747
|
+
},
|
|
748
|
+
"JavascriptOrganizeImports": {
|
|
749
|
+
"type": "object",
|
|
750
|
+
"additionalProperties": false
|
|
751
|
+
},
|
|
752
|
+
"JavascriptParser": {
|
|
753
|
+
"description": "Options that changes how the JavaScript parser behaves",
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"unsafeParameterDecoratorsEnabled": {
|
|
757
|
+
"description": "It enables the experimental and unsafe parsing of parameter decorators\n\nThese decorators belong to an old proposal, and they are subject to change.",
|
|
758
|
+
"type": ["boolean", "null"]
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"additionalProperties": false
|
|
762
|
+
},
|
|
763
|
+
"JsonConfiguration": {
|
|
764
|
+
"description": "Options applied to JSON files",
|
|
765
|
+
"type": "object",
|
|
766
|
+
"properties": {
|
|
767
|
+
"parser": {
|
|
768
|
+
"description": "Parsing options",
|
|
769
|
+
"anyOf": [{ "$ref": "#/definitions/JsonParser" }, { "type": "null" }]
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"additionalProperties": false
|
|
773
|
+
},
|
|
774
|
+
"JsonParser": {
|
|
775
|
+
"description": "Options that changes how the JSON parser behaves",
|
|
776
|
+
"type": "object",
|
|
777
|
+
"properties": {
|
|
778
|
+
"allowComments": {
|
|
779
|
+
"description": "Allow parsing comments in `.json` files",
|
|
780
|
+
"type": ["boolean", "null"]
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
"additionalProperties": false
|
|
784
|
+
},
|
|
785
|
+
"LineWidth": {
|
|
786
|
+
"description": "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320",
|
|
787
|
+
"type": "integer",
|
|
788
|
+
"format": "uint16",
|
|
789
|
+
"minimum": 0.0
|
|
790
|
+
},
|
|
791
|
+
"LinterConfiguration": {
|
|
792
|
+
"type": "object",
|
|
793
|
+
"properties": {
|
|
794
|
+
"enabled": {
|
|
795
|
+
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
|
|
796
|
+
"default": true,
|
|
797
|
+
"type": ["boolean", "null"]
|
|
798
|
+
},
|
|
799
|
+
"ignore": {
|
|
800
|
+
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
801
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
802
|
+
},
|
|
803
|
+
"rules": {
|
|
804
|
+
"description": "List of rules",
|
|
805
|
+
"default": { "recommended": true },
|
|
806
|
+
"anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }]
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
"additionalProperties": false
|
|
810
|
+
},
|
|
811
|
+
"NamingConventionOptions": {
|
|
812
|
+
"description": "Rule's options.",
|
|
813
|
+
"type": "object",
|
|
814
|
+
"properties": {
|
|
815
|
+
"enumMemberCase": {
|
|
816
|
+
"description": "Allowed cases for _TypeScript_ `enum` member names.",
|
|
817
|
+
"allOf": [{ "$ref": "#/definitions/EnumMemberCase" }]
|
|
818
|
+
},
|
|
819
|
+
"strictCase": {
|
|
820
|
+
"description": "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].",
|
|
821
|
+
"type": "boolean"
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"additionalProperties": false
|
|
825
|
+
},
|
|
826
|
+
"Nursery": {
|
|
827
|
+
"description": "A list of rules that belong to this group",
|
|
828
|
+
"type": "object",
|
|
829
|
+
"properties": {
|
|
830
|
+
"all": {
|
|
831
|
+
"description": "It enables ALL rules for this group.",
|
|
832
|
+
"type": ["boolean", "null"]
|
|
833
|
+
},
|
|
834
|
+
"noAccumulatingSpread": {
|
|
835
|
+
"description": "Disallow the use of spread (...) syntax on accumulators.",
|
|
836
|
+
"anyOf": [
|
|
837
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
838
|
+
{ "type": "null" }
|
|
839
|
+
]
|
|
840
|
+
},
|
|
841
|
+
"noAriaUnsupportedElements": {
|
|
842
|
+
"description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.",
|
|
843
|
+
"anyOf": [
|
|
844
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
845
|
+
{ "type": "null" }
|
|
846
|
+
]
|
|
847
|
+
},
|
|
848
|
+
"noBannedTypes": {
|
|
849
|
+
"description": "Disallow primitive type aliases and misleading types.",
|
|
850
|
+
"anyOf": [
|
|
851
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
852
|
+
{ "type": "null" }
|
|
853
|
+
]
|
|
854
|
+
},
|
|
855
|
+
"noConfusingArrow": {
|
|
856
|
+
"description": "Disallow arrow functions where they could be confused with comparisons.",
|
|
857
|
+
"anyOf": [
|
|
858
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
859
|
+
{ "type": "null" }
|
|
860
|
+
]
|
|
861
|
+
},
|
|
862
|
+
"noConstantCondition": {
|
|
863
|
+
"description": "Disallow constant expressions in conditions",
|
|
864
|
+
"anyOf": [
|
|
865
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
866
|
+
{ "type": "null" }
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
"noControlCharactersInRegex": {
|
|
870
|
+
"description": "Prevents from having control characters and some escape sequences that match control characters in regular expressions.",
|
|
871
|
+
"anyOf": [
|
|
872
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
873
|
+
{ "type": "null" }
|
|
874
|
+
]
|
|
875
|
+
},
|
|
876
|
+
"noDuplicateJsonKeys": {
|
|
877
|
+
"description": "Disallow two keys with the same name inside a JSON object.",
|
|
878
|
+
"anyOf": [
|
|
879
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
880
|
+
{ "type": "null" }
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
"noExcessiveComplexity": {
|
|
884
|
+
"description": "Disallow functions that exceed a given complexity score.",
|
|
885
|
+
"anyOf": [
|
|
886
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
887
|
+
{ "type": "null" }
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
"noFallthroughSwitchClause": {
|
|
891
|
+
"description": "Disallow fallthrough of switch clauses.",
|
|
892
|
+
"anyOf": [
|
|
893
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
894
|
+
{ "type": "null" }
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
"noGlobalIsFinite": {
|
|
898
|
+
"description": "Use Number.isFinite instead of global isFinite.",
|
|
899
|
+
"anyOf": [
|
|
900
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
901
|
+
{ "type": "null" }
|
|
902
|
+
]
|
|
903
|
+
},
|
|
904
|
+
"noGlobalIsNan": {
|
|
905
|
+
"description": "Use Number.isNaN instead of global isNaN.",
|
|
906
|
+
"anyOf": [
|
|
907
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
908
|
+
{ "type": "null" }
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
"noNoninteractiveTabindex": {
|
|
912
|
+
"description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.",
|
|
913
|
+
"anyOf": [
|
|
914
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
915
|
+
{ "type": "null" }
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
"noNonoctalDecimalEscape": {
|
|
919
|
+
"description": "Disallow \\8 and \\9 escape sequences in string literals.",
|
|
920
|
+
"anyOf": [
|
|
921
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
922
|
+
{ "type": "null" }
|
|
923
|
+
]
|
|
924
|
+
},
|
|
925
|
+
"noRedundantRoles": {
|
|
926
|
+
"description": "Enforce explicit role property is not the same as implicit/default role property on an element.",
|
|
927
|
+
"anyOf": [
|
|
928
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
929
|
+
{ "type": "null" }
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
"noSelfAssign": {
|
|
933
|
+
"description": "Disallow assignments where both sides are exactly the same.",
|
|
934
|
+
"anyOf": [
|
|
935
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
936
|
+
{ "type": "null" }
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
"noStaticOnlyClass": {
|
|
940
|
+
"description": "This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.",
|
|
941
|
+
"anyOf": [
|
|
942
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
943
|
+
{ "type": "null" }
|
|
944
|
+
]
|
|
945
|
+
},
|
|
946
|
+
"noUnsafeDeclarationMerging": {
|
|
947
|
+
"description": "Disallow unsafe declaration merging between interfaces and classes.",
|
|
948
|
+
"anyOf": [
|
|
949
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
950
|
+
{ "type": "null" }
|
|
951
|
+
]
|
|
952
|
+
},
|
|
953
|
+
"noUselessEmptyExport": {
|
|
954
|
+
"description": "Disallow empty exports that don't change anything in a module file.",
|
|
955
|
+
"anyOf": [
|
|
956
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
957
|
+
{ "type": "null" }
|
|
958
|
+
]
|
|
959
|
+
},
|
|
960
|
+
"noVoid": {
|
|
961
|
+
"description": "Disallow the use of void operators, which is not a familiar operator.",
|
|
962
|
+
"anyOf": [
|
|
963
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
964
|
+
{ "type": "null" }
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
"recommended": {
|
|
968
|
+
"description": "It enables the recommended rules for this group",
|
|
969
|
+
"type": ["boolean", "null"]
|
|
970
|
+
},
|
|
971
|
+
"useAriaPropTypes": {
|
|
972
|
+
"description": "Enforce that ARIA state and property values are valid.",
|
|
973
|
+
"anyOf": [
|
|
974
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
975
|
+
{ "type": "null" }
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
"useArrowFunction": {
|
|
979
|
+
"description": "Use arrow functions over function expressions.",
|
|
980
|
+
"anyOf": [
|
|
981
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
982
|
+
{ "type": "null" }
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
"useExhaustiveDependencies": {
|
|
986
|
+
"description": "Enforce all dependencies are correctly specified.",
|
|
987
|
+
"anyOf": [
|
|
988
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
989
|
+
{ "type": "null" }
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
"useGroupedTypeImport": {
|
|
993
|
+
"description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
|
|
994
|
+
"anyOf": [
|
|
995
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
996
|
+
{ "type": "null" }
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
"useHookAtTopLevel": {
|
|
1000
|
+
"description": "Enforce that all React hooks are being called from the Top Level component functions.",
|
|
1001
|
+
"anyOf": [
|
|
1002
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1003
|
+
{ "type": "null" }
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
"useImportRestrictions": {
|
|
1007
|
+
"description": "Disallows package private imports.",
|
|
1008
|
+
"anyOf": [
|
|
1009
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1010
|
+
{ "type": "null" }
|
|
1011
|
+
]
|
|
1012
|
+
},
|
|
1013
|
+
"useIsArray": {
|
|
1014
|
+
"description": "Use Array.isArray() instead of instanceof Array.",
|
|
1015
|
+
"anyOf": [
|
|
1016
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1017
|
+
{ "type": "null" }
|
|
1018
|
+
]
|
|
1019
|
+
},
|
|
1020
|
+
"useLiteralEnumMembers": {
|
|
1021
|
+
"description": "Require all enum members to be literal values.",
|
|
1022
|
+
"anyOf": [
|
|
1023
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1024
|
+
{ "type": "null" }
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
"useNamingConvention": {
|
|
1028
|
+
"description": "Enforce naming conventions for everything across a codebase.",
|
|
1029
|
+
"anyOf": [
|
|
1030
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1031
|
+
{ "type": "null" }
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
"OrganizeImports": {
|
|
1037
|
+
"type": "object",
|
|
1038
|
+
"properties": {
|
|
1039
|
+
"enabled": {
|
|
1040
|
+
"description": "Enables the organization of imports",
|
|
1041
|
+
"default": true,
|
|
1042
|
+
"type": ["boolean", "null"]
|
|
1043
|
+
},
|
|
1044
|
+
"ignore": {
|
|
1045
|
+
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
1046
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
"additionalProperties": false
|
|
1050
|
+
},
|
|
1051
|
+
"Performance": {
|
|
1052
|
+
"description": "A list of rules that belong to this group",
|
|
1053
|
+
"type": "object",
|
|
1054
|
+
"properties": {
|
|
1055
|
+
"all": {
|
|
1056
|
+
"description": "It enables ALL rules for this group.",
|
|
1057
|
+
"type": ["boolean", "null"]
|
|
1058
|
+
},
|
|
1059
|
+
"noDelete": {
|
|
1060
|
+
"description": "Disallow the use of the delete operator.",
|
|
1061
|
+
"anyOf": [
|
|
1062
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1063
|
+
{ "type": "null" }
|
|
1064
|
+
]
|
|
1065
|
+
},
|
|
1066
|
+
"recommended": {
|
|
1067
|
+
"description": "It enables the recommended rules for this group",
|
|
1068
|
+
"type": ["boolean", "null"]
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
"PlainIndentStyle": {
|
|
1073
|
+
"oneOf": [
|
|
1074
|
+
{ "description": "Tab", "type": "string", "enum": ["tab"] },
|
|
1075
|
+
{ "description": "Space", "type": "string", "enum": ["space"] }
|
|
1076
|
+
]
|
|
1077
|
+
},
|
|
1078
|
+
"PossibleOptions": {
|
|
1079
|
+
"anyOf": [
|
|
1080
|
+
{
|
|
1081
|
+
"description": "Options for `noExcessiveComplexity` rule",
|
|
1082
|
+
"allOf": [{ "$ref": "#/definitions/ComplexityOptions" }]
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"description": "Options for `useExhaustiveDependencies` and `useHookAtTopLevel` rule",
|
|
1086
|
+
"allOf": [{ "$ref": "#/definitions/HooksOptions" }]
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"description": "Options for `useNamingConvention` rule",
|
|
1090
|
+
"allOf": [{ "$ref": "#/definitions/NamingConventionOptions" }]
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"description": "Options for `noRestrictedGlobals` rule",
|
|
1094
|
+
"allOf": [{ "$ref": "#/definitions/RestrictedGlobalsOptions" }]
|
|
1095
|
+
},
|
|
1096
|
+
{ "description": "No options available", "type": "null" }
|
|
1097
|
+
]
|
|
1098
|
+
},
|
|
1099
|
+
"QuoteProperties": { "type": "string", "enum": ["asNeeded", "preserve"] },
|
|
1100
|
+
"QuoteStyle": { "type": "string", "enum": ["double", "single"] },
|
|
1101
|
+
"RestrictedGlobalsOptions": {
|
|
1102
|
+
"description": "Options for the rule `noRestrictedGlobals`.",
|
|
1103
|
+
"type": "object",
|
|
1104
|
+
"properties": {
|
|
1105
|
+
"deniedGlobals": {
|
|
1106
|
+
"description": "A list of names that should trigger the rule",
|
|
1107
|
+
"type": ["array", "null"],
|
|
1108
|
+
"items": { "type": "string" }
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
"additionalProperties": false
|
|
1112
|
+
},
|
|
1113
|
+
"RuleConfiguration": {
|
|
1114
|
+
"anyOf": [
|
|
1115
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1116
|
+
{ "$ref": "#/definitions/RuleWithOptions" }
|
|
1117
|
+
]
|
|
1118
|
+
},
|
|
1119
|
+
"RulePlainConfiguration": {
|
|
1120
|
+
"type": "string",
|
|
1121
|
+
"enum": ["warn", "error", "off"]
|
|
1122
|
+
},
|
|
1123
|
+
"RuleWithOptions": {
|
|
1124
|
+
"type": "object",
|
|
1125
|
+
"required": ["level"],
|
|
1126
|
+
"properties": {
|
|
1127
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1128
|
+
"options": {
|
|
1129
|
+
"anyOf": [
|
|
1130
|
+
{ "$ref": "#/definitions/PossibleOptions" },
|
|
1131
|
+
{ "type": "null" }
|
|
1132
|
+
]
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"additionalProperties": false
|
|
1136
|
+
},
|
|
1137
|
+
"Rules": {
|
|
1138
|
+
"type": "object",
|
|
1139
|
+
"properties": {
|
|
1140
|
+
"a11y": {
|
|
1141
|
+
"anyOf": [{ "$ref": "#/definitions/A11y" }, { "type": "null" }]
|
|
1142
|
+
},
|
|
1143
|
+
"all": {
|
|
1144
|
+
"description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
|
|
1145
|
+
"type": ["boolean", "null"]
|
|
1146
|
+
},
|
|
1147
|
+
"complexity": {
|
|
1148
|
+
"anyOf": [{ "$ref": "#/definitions/Complexity" }, { "type": "null" }]
|
|
1149
|
+
},
|
|
1150
|
+
"correctness": {
|
|
1151
|
+
"anyOf": [{ "$ref": "#/definitions/Correctness" }, { "type": "null" }]
|
|
1152
|
+
},
|
|
1153
|
+
"nursery": {
|
|
1154
|
+
"anyOf": [{ "$ref": "#/definitions/Nursery" }, { "type": "null" }]
|
|
1155
|
+
},
|
|
1156
|
+
"performance": {
|
|
1157
|
+
"anyOf": [{ "$ref": "#/definitions/Performance" }, { "type": "null" }]
|
|
1158
|
+
},
|
|
1159
|
+
"recommended": {
|
|
1160
|
+
"description": "It enables the lint rules recommended by Biome. `true` by default.",
|
|
1161
|
+
"type": ["boolean", "null"]
|
|
1162
|
+
},
|
|
1163
|
+
"security": {
|
|
1164
|
+
"anyOf": [{ "$ref": "#/definitions/Security" }, { "type": "null" }]
|
|
1165
|
+
},
|
|
1166
|
+
"style": {
|
|
1167
|
+
"anyOf": [{ "$ref": "#/definitions/Style" }, { "type": "null" }]
|
|
1168
|
+
},
|
|
1169
|
+
"suspicious": {
|
|
1170
|
+
"anyOf": [{ "$ref": "#/definitions/Suspicious" }, { "type": "null" }]
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
"additionalProperties": false
|
|
1174
|
+
},
|
|
1175
|
+
"Security": {
|
|
1176
|
+
"description": "A list of rules that belong to this group",
|
|
1177
|
+
"type": "object",
|
|
1178
|
+
"properties": {
|
|
1179
|
+
"all": {
|
|
1180
|
+
"description": "It enables ALL rules for this group.",
|
|
1181
|
+
"type": ["boolean", "null"]
|
|
1182
|
+
},
|
|
1183
|
+
"noDangerouslySetInnerHtml": {
|
|
1184
|
+
"description": "Prevent the usage of dangerous JSX props",
|
|
1185
|
+
"anyOf": [
|
|
1186
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1187
|
+
{ "type": "null" }
|
|
1188
|
+
]
|
|
1189
|
+
},
|
|
1190
|
+
"noDangerouslySetInnerHtmlWithChildren": {
|
|
1191
|
+
"description": "Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.",
|
|
1192
|
+
"anyOf": [
|
|
1193
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1194
|
+
{ "type": "null" }
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
"recommended": {
|
|
1198
|
+
"description": "It enables the recommended rules for this group",
|
|
1199
|
+
"type": ["boolean", "null"]
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
"Semicolons": { "type": "string", "enum": ["always", "asNeeded"] },
|
|
1204
|
+
"StringSet": {
|
|
1205
|
+
"type": "array",
|
|
1206
|
+
"items": { "type": "string" },
|
|
1207
|
+
"uniqueItems": true
|
|
1208
|
+
},
|
|
1209
|
+
"Style": {
|
|
1210
|
+
"description": "A list of rules that belong to this group",
|
|
1211
|
+
"type": "object",
|
|
1212
|
+
"properties": {
|
|
1213
|
+
"all": {
|
|
1214
|
+
"description": "It enables ALL rules for this group.",
|
|
1215
|
+
"type": ["boolean", "null"]
|
|
1216
|
+
},
|
|
1217
|
+
"noArguments": {
|
|
1218
|
+
"description": "Disallow the use of arguments",
|
|
1219
|
+
"anyOf": [
|
|
1220
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1221
|
+
{ "type": "null" }
|
|
1222
|
+
]
|
|
1223
|
+
},
|
|
1224
|
+
"noCommaOperator": {
|
|
1225
|
+
"description": "Disallow comma operator.",
|
|
1226
|
+
"anyOf": [
|
|
1227
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1228
|
+
{ "type": "null" }
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
"noImplicitBoolean": {
|
|
1232
|
+
"description": "Disallow implicit true values on JSX boolean attributes",
|
|
1233
|
+
"anyOf": [
|
|
1234
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1235
|
+
{ "type": "null" }
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
1238
|
+
"noInferrableTypes": {
|
|
1239
|
+
"description": "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.",
|
|
1240
|
+
"anyOf": [
|
|
1241
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1242
|
+
{ "type": "null" }
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
"noNamespace": {
|
|
1246
|
+
"description": "Disallow the use of TypeScript's namespaces.",
|
|
1247
|
+
"anyOf": [
|
|
1248
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1249
|
+
{ "type": "null" }
|
|
1250
|
+
]
|
|
1251
|
+
},
|
|
1252
|
+
"noNegationElse": {
|
|
1253
|
+
"description": "Disallow negation in the condition of an if statement if it has an else clause",
|
|
1254
|
+
"anyOf": [
|
|
1255
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1256
|
+
{ "type": "null" }
|
|
1257
|
+
]
|
|
1258
|
+
},
|
|
1259
|
+
"noNonNullAssertion": {
|
|
1260
|
+
"description": "Disallow non-null assertions using the ! postfix operator.",
|
|
1261
|
+
"anyOf": [
|
|
1262
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1263
|
+
{ "type": "null" }
|
|
1264
|
+
]
|
|
1265
|
+
},
|
|
1266
|
+
"noParameterAssign": {
|
|
1267
|
+
"description": "Disallow reassigning function parameters.",
|
|
1268
|
+
"anyOf": [
|
|
1269
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1270
|
+
{ "type": "null" }
|
|
1271
|
+
]
|
|
1272
|
+
},
|
|
1273
|
+
"noParameterProperties": {
|
|
1274
|
+
"description": "Disallow the use of parameter properties in class constructors.",
|
|
1275
|
+
"anyOf": [
|
|
1276
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1277
|
+
{ "type": "null" }
|
|
1278
|
+
]
|
|
1279
|
+
},
|
|
1280
|
+
"noRestrictedGlobals": {
|
|
1281
|
+
"description": "This rule allows you to specify global variable names that you don’t want to use in your application.",
|
|
1282
|
+
"anyOf": [
|
|
1283
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1284
|
+
{ "type": "null" }
|
|
1285
|
+
]
|
|
1286
|
+
},
|
|
1287
|
+
"noShoutyConstants": {
|
|
1288
|
+
"description": "Disallow the use of constants which its value is the upper-case version of its name.",
|
|
1289
|
+
"anyOf": [
|
|
1290
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1291
|
+
{ "type": "null" }
|
|
1292
|
+
]
|
|
1293
|
+
},
|
|
1294
|
+
"noUnusedTemplateLiteral": {
|
|
1295
|
+
"description": "Disallow template literals if interpolation and special-character handling are not needed",
|
|
1296
|
+
"anyOf": [
|
|
1297
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1298
|
+
{ "type": "null" }
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1301
|
+
"noVar": {
|
|
1302
|
+
"description": "Disallow the use of var",
|
|
1303
|
+
"anyOf": [
|
|
1304
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1305
|
+
{ "type": "null" }
|
|
1306
|
+
]
|
|
1307
|
+
},
|
|
1308
|
+
"recommended": {
|
|
1309
|
+
"description": "It enables the recommended rules for this group",
|
|
1310
|
+
"type": ["boolean", "null"]
|
|
1311
|
+
},
|
|
1312
|
+
"useBlockStatements": {
|
|
1313
|
+
"description": "Requires following curly brace conventions. JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity.",
|
|
1314
|
+
"anyOf": [
|
|
1315
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1316
|
+
{ "type": "null" }
|
|
1317
|
+
]
|
|
1318
|
+
},
|
|
1319
|
+
"useConst": {
|
|
1320
|
+
"description": "Require const declarations for variables that are never reassigned after declared.",
|
|
1321
|
+
"anyOf": [
|
|
1322
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1323
|
+
{ "type": "null" }
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
"useDefaultParameterLast": {
|
|
1327
|
+
"description": "Enforce default function parameters and optional function parameters to be last.",
|
|
1328
|
+
"anyOf": [
|
|
1329
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1330
|
+
{ "type": "null" }
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
"useEnumInitializers": {
|
|
1334
|
+
"description": "Require that each enum member value be explicitly initialized.",
|
|
1335
|
+
"anyOf": [
|
|
1336
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1337
|
+
{ "type": "null" }
|
|
1338
|
+
]
|
|
1339
|
+
},
|
|
1340
|
+
"useExponentiationOperator": {
|
|
1341
|
+
"description": "Disallow the use of Math.pow in favor of the ** operator.",
|
|
1342
|
+
"anyOf": [
|
|
1343
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1344
|
+
{ "type": "null" }
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1347
|
+
"useFragmentSyntax": {
|
|
1348
|
+
"description": "This rule enforces the use of <>...</> over <Fragment>...</Fragment>.",
|
|
1349
|
+
"anyOf": [
|
|
1350
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1351
|
+
{ "type": "null" }
|
|
1352
|
+
]
|
|
1353
|
+
},
|
|
1354
|
+
"useNumericLiterals": {
|
|
1355
|
+
"description": "Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals",
|
|
1356
|
+
"anyOf": [
|
|
1357
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1358
|
+
{ "type": "null" }
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
"useSelfClosingElements": {
|
|
1362
|
+
"description": "Prevent extra closing tags for components without children",
|
|
1363
|
+
"anyOf": [
|
|
1364
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1365
|
+
{ "type": "null" }
|
|
1366
|
+
]
|
|
1367
|
+
},
|
|
1368
|
+
"useShorthandArrayType": {
|
|
1369
|
+
"description": "When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.",
|
|
1370
|
+
"anyOf": [
|
|
1371
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1372
|
+
{ "type": "null" }
|
|
1373
|
+
]
|
|
1374
|
+
},
|
|
1375
|
+
"useSingleCaseStatement": {
|
|
1376
|
+
"description": "Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.",
|
|
1377
|
+
"anyOf": [
|
|
1378
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1379
|
+
{ "type": "null" }
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
"useSingleVarDeclarator": {
|
|
1383
|
+
"description": "Disallow multiple variable declarations in the same variable statement",
|
|
1384
|
+
"anyOf": [
|
|
1385
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1386
|
+
{ "type": "null" }
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
"useTemplate": {
|
|
1390
|
+
"description": "Template literals are preferred over string concatenation.",
|
|
1391
|
+
"anyOf": [
|
|
1392
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1393
|
+
{ "type": "null" }
|
|
1394
|
+
]
|
|
1395
|
+
},
|
|
1396
|
+
"useWhile": {
|
|
1397
|
+
"description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed",
|
|
1398
|
+
"anyOf": [
|
|
1399
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1400
|
+
{ "type": "null" }
|
|
1401
|
+
]
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
"Suspicious": {
|
|
1406
|
+
"description": "A list of rules that belong to this group",
|
|
1407
|
+
"type": "object",
|
|
1408
|
+
"properties": {
|
|
1409
|
+
"all": {
|
|
1410
|
+
"description": "It enables ALL rules for this group.",
|
|
1411
|
+
"type": ["boolean", "null"]
|
|
1412
|
+
},
|
|
1413
|
+
"noArrayIndexKey": {
|
|
1414
|
+
"description": "Discourage the usage of Array index in keys.",
|
|
1415
|
+
"anyOf": [
|
|
1416
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1417
|
+
{ "type": "null" }
|
|
1418
|
+
]
|
|
1419
|
+
},
|
|
1420
|
+
"noAssignInExpressions": {
|
|
1421
|
+
"description": "Disallow assignments in expressions.",
|
|
1422
|
+
"anyOf": [
|
|
1423
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1424
|
+
{ "type": "null" }
|
|
1425
|
+
]
|
|
1426
|
+
},
|
|
1427
|
+
"noAsyncPromiseExecutor": {
|
|
1428
|
+
"description": "Disallows using an async function as a Promise executor.",
|
|
1429
|
+
"anyOf": [
|
|
1430
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1431
|
+
{ "type": "null" }
|
|
1432
|
+
]
|
|
1433
|
+
},
|
|
1434
|
+
"noCatchAssign": {
|
|
1435
|
+
"description": "Disallow reassigning exceptions in catch clauses.",
|
|
1436
|
+
"anyOf": [
|
|
1437
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1438
|
+
{ "type": "null" }
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
"noClassAssign": {
|
|
1442
|
+
"description": "Disallow reassigning class members.",
|
|
1443
|
+
"anyOf": [
|
|
1444
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1445
|
+
{ "type": "null" }
|
|
1446
|
+
]
|
|
1447
|
+
},
|
|
1448
|
+
"noCommentText": {
|
|
1449
|
+
"description": "Prevent comments from being inserted as text nodes",
|
|
1450
|
+
"anyOf": [
|
|
1451
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1452
|
+
{ "type": "null" }
|
|
1453
|
+
]
|
|
1454
|
+
},
|
|
1455
|
+
"noCompareNegZero": {
|
|
1456
|
+
"description": "Disallow comparing against -0",
|
|
1457
|
+
"anyOf": [
|
|
1458
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1459
|
+
{ "type": "null" }
|
|
1460
|
+
]
|
|
1461
|
+
},
|
|
1462
|
+
"noConfusingLabels": {
|
|
1463
|
+
"description": "Disallow labeled statements that are not loops.",
|
|
1464
|
+
"anyOf": [
|
|
1465
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1466
|
+
{ "type": "null" }
|
|
1467
|
+
]
|
|
1468
|
+
},
|
|
1469
|
+
"noConsoleLog": {
|
|
1470
|
+
"description": "Disallow the use of console.log",
|
|
1471
|
+
"anyOf": [
|
|
1472
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1473
|
+
{ "type": "null" }
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
"noConstEnum": {
|
|
1477
|
+
"description": "Disallow TypeScript const enum",
|
|
1478
|
+
"anyOf": [
|
|
1479
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1480
|
+
{ "type": "null" }
|
|
1481
|
+
]
|
|
1482
|
+
},
|
|
1483
|
+
"noDebugger": {
|
|
1484
|
+
"description": "Disallow the use of debugger",
|
|
1485
|
+
"anyOf": [
|
|
1486
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1487
|
+
{ "type": "null" }
|
|
1488
|
+
]
|
|
1489
|
+
},
|
|
1490
|
+
"noDoubleEquals": {
|
|
1491
|
+
"description": "Require the use of === and !==",
|
|
1492
|
+
"anyOf": [
|
|
1493
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1494
|
+
{ "type": "null" }
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1497
|
+
"noDuplicateCase": {
|
|
1498
|
+
"description": "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.",
|
|
1499
|
+
"anyOf": [
|
|
1500
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1501
|
+
{ "type": "null" }
|
|
1502
|
+
]
|
|
1503
|
+
},
|
|
1504
|
+
"noDuplicateClassMembers": {
|
|
1505
|
+
"description": "Disallow duplicate class members.",
|
|
1506
|
+
"anyOf": [
|
|
1507
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1508
|
+
{ "type": "null" }
|
|
1509
|
+
]
|
|
1510
|
+
},
|
|
1511
|
+
"noDuplicateJsxProps": {
|
|
1512
|
+
"description": "Prevents JSX properties to be assigned multiple times.",
|
|
1513
|
+
"anyOf": [
|
|
1514
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1515
|
+
{ "type": "null" }
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
"noDuplicateObjectKeys": {
|
|
1519
|
+
"description": "Prevents object literals having more than one property declaration for the same name. If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake.",
|
|
1520
|
+
"anyOf": [
|
|
1521
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1522
|
+
{ "type": "null" }
|
|
1523
|
+
]
|
|
1524
|
+
},
|
|
1525
|
+
"noDuplicateParameters": {
|
|
1526
|
+
"description": "Disallow duplicate function parameter name.",
|
|
1527
|
+
"anyOf": [
|
|
1528
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1529
|
+
{ "type": "null" }
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1532
|
+
"noEmptyInterface": {
|
|
1533
|
+
"description": "Disallow the declaration of empty interfaces.",
|
|
1534
|
+
"anyOf": [
|
|
1535
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1536
|
+
{ "type": "null" }
|
|
1537
|
+
]
|
|
1538
|
+
},
|
|
1539
|
+
"noExplicitAny": {
|
|
1540
|
+
"description": "Disallow the any type usage.",
|
|
1541
|
+
"anyOf": [
|
|
1542
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1543
|
+
{ "type": "null" }
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
"noExtraNonNullAssertion": {
|
|
1547
|
+
"description": "Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.",
|
|
1548
|
+
"anyOf": [
|
|
1549
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1550
|
+
{ "type": "null" }
|
|
1551
|
+
]
|
|
1552
|
+
},
|
|
1553
|
+
"noFunctionAssign": {
|
|
1554
|
+
"description": "Disallow reassigning function declarations.",
|
|
1555
|
+
"anyOf": [
|
|
1556
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1557
|
+
{ "type": "null" }
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
"noImportAssign": {
|
|
1561
|
+
"description": "Disallow assigning to imported bindings",
|
|
1562
|
+
"anyOf": [
|
|
1563
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1564
|
+
{ "type": "null" }
|
|
1565
|
+
]
|
|
1566
|
+
},
|
|
1567
|
+
"noLabelVar": {
|
|
1568
|
+
"description": "Disallow labels that share a name with a variable",
|
|
1569
|
+
"anyOf": [
|
|
1570
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1571
|
+
{ "type": "null" }
|
|
1572
|
+
]
|
|
1573
|
+
},
|
|
1574
|
+
"noPrototypeBuiltins": {
|
|
1575
|
+
"description": "Disallow direct use of Object.prototype builtins.",
|
|
1576
|
+
"anyOf": [
|
|
1577
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1578
|
+
{ "type": "null" }
|
|
1579
|
+
]
|
|
1580
|
+
},
|
|
1581
|
+
"noRedeclare": {
|
|
1582
|
+
"description": "Disallow variable, function, class, and type redeclarations in the same scope.",
|
|
1583
|
+
"anyOf": [
|
|
1584
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1585
|
+
{ "type": "null" }
|
|
1586
|
+
]
|
|
1587
|
+
},
|
|
1588
|
+
"noRedundantUseStrict": {
|
|
1589
|
+
"description": "Prevents from having redundant \"use strict\".",
|
|
1590
|
+
"anyOf": [
|
|
1591
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1592
|
+
{ "type": "null" }
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
"noSelfCompare": {
|
|
1596
|
+
"description": "Disallow comparisons where both sides are exactly the same.",
|
|
1597
|
+
"anyOf": [
|
|
1598
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1599
|
+
{ "type": "null" }
|
|
1600
|
+
]
|
|
1601
|
+
},
|
|
1602
|
+
"noShadowRestrictedNames": {
|
|
1603
|
+
"description": "Disallow identifiers from shadowing restricted names.",
|
|
1604
|
+
"anyOf": [
|
|
1605
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1606
|
+
{ "type": "null" }
|
|
1607
|
+
]
|
|
1608
|
+
},
|
|
1609
|
+
"noSparseArray": {
|
|
1610
|
+
"description": "Disallow sparse arrays",
|
|
1611
|
+
"anyOf": [
|
|
1612
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1613
|
+
{ "type": "null" }
|
|
1614
|
+
]
|
|
1615
|
+
},
|
|
1616
|
+
"noUnsafeNegation": {
|
|
1617
|
+
"description": "Disallow using unsafe negation.",
|
|
1618
|
+
"anyOf": [
|
|
1619
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1620
|
+
{ "type": "null" }
|
|
1621
|
+
]
|
|
1622
|
+
},
|
|
1623
|
+
"recommended": {
|
|
1624
|
+
"description": "It enables the recommended rules for this group",
|
|
1625
|
+
"type": ["boolean", "null"]
|
|
1626
|
+
},
|
|
1627
|
+
"useDefaultSwitchClauseLast": {
|
|
1628
|
+
"description": "Enforce default clauses in switch statements to be last",
|
|
1629
|
+
"anyOf": [
|
|
1630
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1631
|
+
{ "type": "null" }
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
"useNamespaceKeyword": {
|
|
1635
|
+
"description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.",
|
|
1636
|
+
"anyOf": [
|
|
1637
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1638
|
+
{ "type": "null" }
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
"useValidTypeof": {
|
|
1642
|
+
"description": "This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions",
|
|
1643
|
+
"anyOf": [
|
|
1644
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1645
|
+
{ "type": "null" }
|
|
1646
|
+
]
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
"TrailingComma": {
|
|
1651
|
+
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.",
|
|
1652
|
+
"oneOf": [
|
|
1653
|
+
{
|
|
1654
|
+
"description": "Trailing commas wherever possible (including function parameters and calls).",
|
|
1655
|
+
"type": "string",
|
|
1656
|
+
"enum": ["all"]
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"description": "Trailing commas where valid in ES5 (objects, arrays, etc.). No trailing commas in type parameters in TypeScript.",
|
|
1660
|
+
"type": "string",
|
|
1661
|
+
"enum": ["es5"]
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"description": "No trailing commas.",
|
|
1665
|
+
"type": "string",
|
|
1666
|
+
"enum": ["none"]
|
|
1667
|
+
}
|
|
1668
|
+
]
|
|
1669
|
+
},
|
|
1670
|
+
"VcsClientKind": {
|
|
1671
|
+
"oneOf": [
|
|
1672
|
+
{
|
|
1673
|
+
"description": "Integration with the git client as VCS",
|
|
1674
|
+
"type": "string",
|
|
1675
|
+
"enum": ["git"]
|
|
1676
|
+
}
|
|
1677
|
+
]
|
|
1678
|
+
},
|
|
1679
|
+
"VcsConfiguration": {
|
|
1680
|
+
"description": "Set of properties to integrate Biome with a VCS software.",
|
|
1681
|
+
"type": "object",
|
|
1682
|
+
"properties": {
|
|
1683
|
+
"clientKind": {
|
|
1684
|
+
"description": "The kind of client.",
|
|
1685
|
+
"anyOf": [
|
|
1686
|
+
{ "$ref": "#/definitions/VcsClientKind" },
|
|
1687
|
+
{ "type": "null" }
|
|
1688
|
+
]
|
|
1689
|
+
},
|
|
1690
|
+
"enabled": {
|
|
1691
|
+
"description": "Whether Biome should integrate itself with the VCS client",
|
|
1692
|
+
"type": ["boolean", "null"]
|
|
1693
|
+
},
|
|
1694
|
+
"root": {
|
|
1695
|
+
"description": "The folder where Biome should check for VCS files. By default, Biome will use the same folder where `rome.json` was found.\n\nIf Biome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Biome won't use the VCS integration, and a diagnostic will be emitted",
|
|
1696
|
+
"type": ["string", "null"]
|
|
1697
|
+
},
|
|
1698
|
+
"useIgnoreFile": {
|
|
1699
|
+
"description": "Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file.",
|
|
1700
|
+
"type": ["boolean", "null"]
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"additionalProperties": false
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|