@biomejs/wasm-web 1.9.5-nightly.c0cccb2 → 2.0.0-beta

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/biome_wasm.d.ts CHANGED
@@ -4,180 +4,169 @@ export function main(): void;
4
4
  interface SupportsFeatureParams {
5
5
  features: FeatureName;
6
6
  path: BiomePath;
7
+ projectKey: ProjectKey;
7
8
  }
8
9
  type FeatureName = FeatureKind[];
9
- interface BiomePath {
10
- /**
11
- * Determines the kind of the file inside Biome. Some files are considered as configuration files, others as manifest files, and others as files to handle
12
- */
13
- kind: FileKind;
14
- /**
15
- * The path to the file
16
- */
17
- path: string;
18
- /**
19
- * Whether this path (usually a file) was fixed as a result of a format/lint/check command with the `--write` filag.
20
- */
21
- was_written: boolean;
22
- }
23
- type FeatureKind =
24
- | "Format"
25
- | "Lint"
26
- | "OrganizeImports"
27
- | "Search"
28
- | "Assists"
29
- | "Debug";
30
- type FileKind = FileKind2[];
31
- type FileKind2 =
32
- | "Config"
33
- | "Manifest"
34
- | "Ignore"
35
- | "Inspectable"
36
- | "Handleable";
10
+ type BiomePath = string;
11
+ type ProjectKey = number;
12
+ type FeatureKind = "format" | "lint" | "search" | "assist" | "debug";
37
13
  interface FileFeaturesResult {
38
- features_supported: {};
14
+ featuresSupported: Map<FeatureKind, SupportKind>;
39
15
  }
16
+ type SupportKind =
17
+ | "supported"
18
+ | "ignored"
19
+ | "protected"
20
+ | "featureNotEnabled"
21
+ | "fileNotSupported";
40
22
  interface UpdateSettingsParams {
41
- configuration: PartialConfiguration;
42
- gitignore_matches: string[];
43
- vcs_base_path?: string;
44
- workspace_directory?: string;
23
+ configuration: Configuration;
24
+ projectKey: ProjectKey;
25
+ workspaceDirectory?: BiomePath;
45
26
  }
46
- interface PartialConfiguration {
27
+ interface Configuration {
47
28
  /**
48
29
  * A field for the [JSON schema](https://json-schema.org/) specification
49
30
  */
50
- $schema?: string;
31
+ $schema?: Schema;
51
32
  /**
52
33
  * Specific configuration for assists
53
34
  */
54
- assists?: PartialAssistsConfiguration;
35
+ assist?: AssistConfiguration;
55
36
  /**
56
37
  * Specific configuration for the Css language
57
38
  */
58
- css?: PartialCssConfiguration;
39
+ css?: CssConfiguration;
59
40
  /**
60
41
  * A list of paths to other JSON files, used to extends the current configuration.
61
42
  */
62
- extends?: StringSet;
43
+ extends?: string[];
63
44
  /**
64
45
  * The configuration of the filesystem
65
46
  */
66
- files?: PartialFilesConfiguration;
47
+ files?: FilesConfiguration;
67
48
  /**
68
49
  * The configuration of the formatter
69
50
  */
70
- formatter?: PartialFormatterConfiguration;
51
+ formatter?: FormatterConfiguration;
52
+ /**
53
+ * Specific configuration for the GraphQL language
54
+ */
55
+ graphql?: GraphqlConfiguration;
71
56
  /**
72
57
  * Specific configuration for the GraphQL language
73
58
  */
74
- graphql?: PartialGraphqlConfiguration;
59
+ grit?: GritConfiguration;
60
+ /**
61
+ * Specific configuration for the HTML language
62
+ */
63
+ html?: HtmlConfiguration;
75
64
  /**
76
65
  * Specific configuration for the JavaScript language
77
66
  */
78
- javascript?: PartialJavascriptConfiguration;
67
+ javascript?: JsConfiguration;
79
68
  /**
80
69
  * Specific configuration for the Json language
81
70
  */
82
- json?: PartialJsonConfiguration;
71
+ json?: JsonConfiguration;
83
72
  /**
84
73
  * The configuration for the linter
85
74
  */
86
- linter?: PartialLinterConfiguration;
87
- /**
88
- * The configuration of the import sorting
89
- */
90
- organizeImports?: PartialOrganizeImports;
75
+ linter?: LinterConfiguration;
91
76
  /**
92
77
  * A list of granular patterns that should be applied only to a sub set of files
93
78
  */
94
79
  overrides?: Overrides;
80
+ /**
81
+ * List of plugins to load.
82
+ */
83
+ plugins?: Plugins;
84
+ /**
85
+ * Indicates whether this configuration file is at the root of a Biome project. By default, this is `true`.
86
+ */
87
+ root?: Bool;
95
88
  /**
96
89
  * The configuration of the VCS integration
97
90
  */
98
- vcs?: PartialVcsConfiguration;
91
+ vcs?: VcsConfiguration;
99
92
  }
100
- interface PartialAssistsConfiguration {
93
+ type Schema = string;
94
+ interface AssistConfiguration {
101
95
  /**
102
- * Whether Biome should fail in CLI if the assists were not applied to the code.
96
+ * Whether Biome should fail in CLI if the assist were not applied to the code.
103
97
  */
104
98
  actions?: Actions;
105
99
  /**
106
- * Whether Biome should enable assists via LSP.
100
+ * Whether Biome should enable assist via LSP.
107
101
  */
108
- enabled?: boolean;
102
+ enabled?: Bool;
109
103
  /**
110
- * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
104
+ * A list of glob patterns. Biome will include files/folders that will match these patterns.
111
105
  */
112
- ignore?: StringSet;
113
- /**
114
- * A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
115
- */
116
- include?: StringSet;
106
+ includes?: Glob[];
117
107
  }
118
- interface PartialCssConfiguration {
108
+ interface CssConfiguration {
119
109
  /**
120
- * CSS assists options
110
+ * CSS assist options
121
111
  */
122
- assists?: PartialCssAssists;
112
+ assist?: CssAssistConfiguration;
123
113
  /**
124
114
  * CSS formatter options
125
115
  */
126
- formatter?: PartialCssFormatter;
116
+ formatter?: CssFormatterConfiguration;
117
+ /**
118
+ * CSS globals
119
+ */
120
+ globals?: string[];
127
121
  /**
128
122
  * CSS linter options
129
123
  */
130
- linter?: PartialCssLinter;
124
+ linter?: CssLinterConfiguration;
131
125
  /**
132
126
  * CSS parsing options
133
127
  */
134
- parser?: PartialCssParser;
128
+ parser?: CssParserConfiguration;
135
129
  }
136
- type StringSet = string[];
137
- interface PartialFilesConfiguration {
138
- /**
139
- * A list of Unix shell style patterns. Biome will ignore files/folders that will match these patterns.
140
- */
141
- ignore?: StringSet;
130
+ interface FilesConfiguration {
142
131
  /**
143
132
  * Tells Biome to not emit diagnostics when handling files that doesn't know
144
133
  */
145
- ignoreUnknown?: boolean;
134
+ ignoreUnknown?: Bool;
146
135
  /**
147
- * A list of Unix shell style patterns. Biome will handle only those files/folders that will match these patterns.
136
+ * A list of glob patterns. Biome will handle only those files/folders that will match these patterns.
148
137
  */
149
- include?: StringSet;
138
+ includes?: Glob[];
150
139
  /**
151
140
  * The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB
152
141
  */
153
- maxSize?: number;
142
+ maxSize?: MaxSize;
154
143
  }
155
- interface PartialFormatterConfiguration {
144
+ interface FormatterConfiguration {
156
145
  /**
157
- * The attribute position style in HTMLish languages. By default auto.
146
+ * The attribute position style in HTML-ish languages. Defaults to auto.
158
147
  */
159
148
  attributePosition?: AttributePosition;
160
149
  /**
161
- * Whether to insert spaces around brackets in object literals. Defaults to true.
150
+ * Put the `>` of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
162
151
  */
163
- bracketSpacing?: BracketSpacing;
164
- enabled?: boolean;
152
+ bracketSameLine?: BracketSameLine;
165
153
  /**
166
- * Stores whether formatting should be allowed to proceed if a given file has syntax errors
154
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
167
155
  */
168
- formatWithErrors?: boolean;
156
+ bracketSpacing?: BracketSpacing;
157
+ enabled?: Bool;
169
158
  /**
170
- * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
159
+ * Whether to expand arrays and objects on multiple lines. When set to `auto`, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to `always`, these literals are formatted on multiple lines, regardless of length of the list. When set to `never`, these literals are formatted on a single line if it fits in the line. When formatting `package.json`, Biome will use `always` unless configured otherwise. Defaults to "auto".
171
160
  */
172
- ignore?: StringSet;
161
+ expand?: Expand;
173
162
  /**
174
- * A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
163
+ * Stores whether formatting should be allowed to proceed if a given file has syntax errors
175
164
  */
176
- include?: StringSet;
165
+ formatWithErrors?: Bool;
177
166
  /**
178
- * The size of the indentation, 2 by default (deprecated, use `indent-width`)
167
+ * A list of glob patterns. The formatter will include files/folders that will match these patterns.
179
168
  */
180
- indentSize?: IndentWidth;
169
+ includes?: Glob[];
181
170
  /**
182
171
  * The indent style.
183
172
  */
@@ -195,32 +184,62 @@ interface PartialFormatterConfiguration {
195
184
  */
196
185
  lineWidth?: LineWidth;
197
186
  /**
198
- * Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false.
187
+ * Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration.
188
+
189
+ Default: `true`.
199
190
  */
200
- useEditorconfig?: boolean;
191
+ useEditorconfig?: Bool;
201
192
  }
202
- interface PartialGraphqlConfiguration {
193
+ interface GraphqlConfiguration {
194
+ /**
195
+ * Assist options
196
+ */
197
+ assist?: GraphqlAssistConfiguration;
203
198
  /**
204
199
  * GraphQL formatter options
205
200
  */
206
- formatter?: PartialGraphqlFormatter;
207
- linter?: PartialGraphqlLinter;
201
+ formatter?: GraphqlFormatterConfiguration;
202
+ linter?: GraphqlLinterConfiguration;
203
+ }
204
+ interface GritConfiguration {
205
+ /**
206
+ * Assist options
207
+ */
208
+ assist?: GritAssistConfiguration;
209
+ /**
210
+ * Formatting options
211
+ */
212
+ formatter?: GritFormatterConfiguration;
213
+ /**
214
+ * Formatting options
215
+ */
216
+ linter?: GritLinterConfiguration;
217
+ }
218
+ interface HtmlConfiguration {
219
+ /**
220
+ * HTML formatter options
221
+ */
222
+ formatter?: HtmlFormatterConfiguration;
223
+ /**
224
+ * HTML parsing options
225
+ */
226
+ parser?: HtmlParserConfiguration;
208
227
  }
209
- interface PartialJavascriptConfiguration {
228
+ interface JsConfiguration {
210
229
  /**
211
- * Assists options
230
+ * Assist options
212
231
  */
213
- assists?: PartialJavascriptAssists;
232
+ assist?: JsAssistConfiguration;
214
233
  /**
215
234
  * Formatting options
216
235
  */
217
- formatter?: PartialJavascriptFormatter;
236
+ formatter?: JsFormatterConfiguration;
218
237
  /**
219
238
  * A list of global bindings that should be ignored by the analyzers
220
239
 
221
240
  If defined here, they should not emit diagnostics.
222
241
  */
223
- globals?: StringSet;
242
+ globals?: string[];
224
243
  /**
225
244
  * Indicates the type of runtime or transformation used for interpreting JSX.
226
245
  */
@@ -228,65 +247,52 @@ If defined here, they should not emit diagnostics.
228
247
  /**
229
248
  * Linter options
230
249
  */
231
- linter?: PartialJavascriptLinter;
232
- organizeImports?: PartialJavascriptOrganizeImports;
250
+ linter?: JsLinterConfiguration;
233
251
  /**
234
252
  * Parsing options
235
253
  */
236
- parser?: PartialJavascriptParser;
254
+ parser?: JsParserConfiguration;
237
255
  }
238
- interface PartialJsonConfiguration {
256
+ interface JsonConfiguration {
239
257
  /**
240
- * Assists options
258
+ * Assist options
241
259
  */
242
- assists?: PartialJsonAssists;
260
+ assist?: JsonAssistConfiguration;
243
261
  /**
244
262
  * Formatting options
245
263
  */
246
- formatter?: PartialJsonFormatter;
264
+ formatter?: JsonFormatterConfiguration;
247
265
  /**
248
266
  * Linting options
249
267
  */
250
- linter?: PartialJsonLinter;
268
+ linter?: JsonLinterConfiguration;
251
269
  /**
252
270
  * Parsing options
253
271
  */
254
- parser?: PartialJsonParser;
272
+ parser?: JsonParserConfiguration;
255
273
  }
256
- interface PartialLinterConfiguration {
274
+ interface LinterConfiguration {
257
275
  /**
258
- * if `false`, it disables the feature and the linter won't be executed. `true` by default
276
+ * An object where the keys are the names of the domains, and the values are `all`, `recommended`, or `none`.
259
277
  */
260
- enabled?: boolean;
278
+ domains?: RuleDomains;
261
279
  /**
262
- * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
280
+ * if `false`, it disables the feature and the linter won't be executed. `true` by default
263
281
  */
264
- ignore?: StringSet;
282
+ enabled?: Bool;
265
283
  /**
266
- * A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
284
+ * A list of glob patterns. The analyzer will handle only those files/folders that will match these patterns.
267
285
  */
268
- include?: StringSet;
286
+ includes?: Glob[];
269
287
  /**
270
288
  * List of rules
271
289
  */
272
290
  rules?: Rules;
273
291
  }
274
- interface PartialOrganizeImports {
275
- /**
276
- * Enables the organization of imports
277
- */
278
- enabled?: boolean;
279
- /**
280
- * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
281
- */
282
- ignore?: StringSet;
283
- /**
284
- * A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
285
- */
286
- include?: StringSet;
287
- }
288
292
  type Overrides = OverridePattern[];
289
- interface PartialVcsConfiguration {
293
+ type Plugins = PluginConfiguration[];
294
+ type Bool = boolean;
295
+ interface VcsConfiguration {
290
296
  /**
291
297
  * The kind of client.
292
298
  */
@@ -298,7 +304,7 @@ interface PartialVcsConfiguration {
298
304
  /**
299
305
  * Whether Biome should integrate itself with the VCS client
300
306
  */
301
- enabled?: boolean;
307
+ enabled?: Bool;
302
308
  /**
303
309
  * The folder where Biome should check for VCS files. By default, Biome will use the same folder where `biome.json` was found.
304
310
 
@@ -308,22 +314,27 @@ If Biome can't find the configuration, it will attempt to use the current workin
308
314
  /**
309
315
  * Whether Biome should use the VCS ignore file. When [true], Biome will ignore the files specified in the ignore file.
310
316
  */
311
- useIgnoreFile?: boolean;
317
+ useIgnoreFile?: Bool;
312
318
  }
313
319
  interface Actions {
320
+ /**
321
+ * It enables the assist actions recommended by Biome. `true` by default.
322
+ */
323
+ recommended?: boolean;
314
324
  source?: Source;
315
325
  }
316
- interface PartialCssAssists {
326
+ type Glob = string;
327
+ interface CssAssistConfiguration {
317
328
  /**
318
- * Control the assists for CSS files.
329
+ * Control the assist for CSS files.
319
330
  */
320
- enabled?: boolean;
331
+ enabled?: Bool;
321
332
  }
322
- interface PartialCssFormatter {
333
+ interface CssFormatterConfiguration {
323
334
  /**
324
335
  * Control the formatter for CSS (and its super languages) files.
325
336
  */
326
- enabled?: boolean;
337
+ enabled?: Bool;
327
338
  /**
328
339
  * The indent style applied to CSS (and its super languages) files.
329
340
  */
@@ -345,29 +356,38 @@ interface PartialCssFormatter {
345
356
  */
346
357
  quoteStyle?: QuoteStyle;
347
358
  }
348
- interface PartialCssLinter {
359
+ interface CssLinterConfiguration {
349
360
  /**
350
361
  * Control the linter for CSS files.
351
362
  */
352
- enabled?: boolean;
363
+ enabled?: Bool;
353
364
  }
354
- interface PartialCssParser {
365
+ interface CssParserConfiguration {
355
366
  /**
356
367
  * Allow comments to appear on incorrect lines in `.css` files
357
368
  */
358
- allowWrongLineComments?: boolean;
369
+ allowWrongLineComments?: Bool;
359
370
  /**
360
371
  * Enables parsing of CSS Modules specific features.
361
372
  */
362
- cssModules?: boolean;
373
+ cssModules?: Bool;
363
374
  }
375
+ type MaxSize = number;
364
376
  type AttributePosition = "auto" | "multiline";
377
+ type BracketSameLine = boolean;
365
378
  type BracketSpacing = boolean;
366
- type IndentWidth = number;
379
+ type Expand = "auto" | "always" | "never";
367
380
  type IndentStyle = "tab" | "space";
381
+ type IndentWidth = number;
368
382
  type LineEnding = "lf" | "crlf" | "cr";
369
383
  type LineWidth = number;
370
- interface PartialGraphqlFormatter {
384
+ interface GraphqlAssistConfiguration {
385
+ /**
386
+ * Control the formatter for GraphQL files.
387
+ */
388
+ enabled?: Bool;
389
+ }
390
+ interface GraphqlFormatterConfiguration {
371
391
  /**
372
392
  * Whether to insert spaces around brackets in object literals. Defaults to true.
373
393
  */
@@ -375,7 +395,7 @@ interface PartialGraphqlFormatter {
375
395
  /**
376
396
  * Control the formatter for GraphQL files.
377
397
  */
378
- enabled?: boolean;
398
+ enabled?: Bool;
379
399
  /**
380
400
  * The indent style applied to GraphQL files.
381
401
  */
@@ -397,31 +417,104 @@ interface PartialGraphqlFormatter {
397
417
  */
398
418
  quoteStyle?: QuoteStyle;
399
419
  }
400
- interface PartialGraphqlLinter {
420
+ interface GraphqlLinterConfiguration {
401
421
  /**
402
422
  * Control the formatter for GraphQL files.
403
423
  */
404
- enabled?: boolean;
424
+ enabled?: Bool;
405
425
  }
406
- interface PartialJavascriptAssists {
426
+ interface GritAssistConfiguration {
407
427
  /**
408
- * Control the linter for JavaScript (and its super languages) files.
428
+ * Control the assist functionality for Grit files.
429
+ */
430
+ enabled?: Bool;
431
+ }
432
+ interface GritFormatterConfiguration {
433
+ /**
434
+ * Control the formatter for Grit files.
435
+ */
436
+ enabled?: Bool;
437
+ /**
438
+ * The indent style applied to Grit files.
439
+ */
440
+ indentStyle?: IndentStyle;
441
+ /**
442
+ * The size of the indentation applied to Grit files. Default to 2.
443
+ */
444
+ indentWidth?: IndentWidth;
445
+ /**
446
+ * The type of line ending applied to Grit files.
447
+ */
448
+ lineEnding?: LineEnding;
449
+ /**
450
+ * What's the max width of a line applied to Grit files. Defaults to 80.
451
+ */
452
+ lineWidth?: LineWidth;
453
+ }
454
+ interface GritLinterConfiguration {
455
+ /**
456
+ * Control the linter for Grit files.
457
+ */
458
+ enabled?: Bool;
459
+ }
460
+ interface HtmlFormatterConfiguration {
461
+ /**
462
+ * The attribute position style in HTML elements. Defaults to auto.
463
+ */
464
+ attributePosition?: AttributePosition;
465
+ /**
466
+ * Whether to hug the closing bracket of multiline HTML tags to the end of the last line, rather than being alone on the following line. Defaults to false.
467
+ */
468
+ bracketSameLine?: BracketSameLine;
469
+ /**
470
+ * Control the formatter for HTML (and its super languages) files.
409
471
  */
410
- enabled?: boolean;
472
+ enabled?: Bool;
473
+ /**
474
+ * Whether to indent the `<script>` and `<style>` tags for HTML (and its super languages). Defaults to false.
475
+ */
476
+ indentScriptAndStyle?: IndentScriptAndStyle;
477
+ /**
478
+ * The indent style applied to HTML (and its super languages) files.
479
+ */
480
+ indentStyle?: IndentStyle;
481
+ /**
482
+ * The size of the indentation applied to HTML (and its super languages) files. Default to 2.
483
+ */
484
+ indentWidth?: IndentWidth;
485
+ /**
486
+ * The type of line ending applied to HTML (and its super languages) files.
487
+ */
488
+ lineEnding?: LineEnding;
489
+ /**
490
+ * What's the max width of a line applied to HTML (and its super languages) files. Defaults to 80.
491
+ */
492
+ lineWidth?: LineWidth;
493
+ /**
494
+ * Whether to account for whitespace sensitivity when formatting HTML (and its super languages). Defaults to "css".
495
+ */
496
+ whitespaceSensitivity?: WhitespaceSensitivity;
411
497
  }
412
- interface PartialJavascriptFormatter {
498
+ type HtmlParserConfiguration = null;
499
+ interface JsAssistConfiguration {
500
+ /**
501
+ * Control the assist for JavaScript (and its super languages) files.
502
+ */
503
+ enabled?: Bool;
504
+ }
505
+ interface JsFormatterConfiguration {
413
506
  /**
414
507
  * Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
415
508
  */
416
509
  arrowParentheses?: ArrowParentheses;
417
510
  /**
418
- * The attribute position style in jsx elements. Defaults to auto.
511
+ * The attribute position style in JSX elements. Defaults to auto.
419
512
  */
420
513
  attributePosition?: AttributePosition;
421
514
  /**
422
515
  * Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false.
423
516
  */
424
- bracketSameLine?: boolean;
517
+ bracketSameLine?: BracketSameLine;
425
518
  /**
426
519
  * Whether to insert spaces around brackets in object literals. Defaults to true.
427
520
  */
@@ -429,11 +522,11 @@ interface PartialJavascriptFormatter {
429
522
  /**
430
523
  * Control the formatter for JavaScript (and its super languages) files.
431
524
  */
432
- enabled?: boolean;
525
+ enabled?: Bool;
433
526
  /**
434
- * The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.
527
+ * Whether to expand arrays and objects on multiple lines. When set to `auto`, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to `always`, these literals are formatted on multiple lines, regardless of length of the list. When set to `never`, these literals are formatted on a single line if it fits in the line. When formatting `package.json`, Biome will use `always` unless configured otherwise. Defaults to "auto".
435
528
  */
436
- indentSize?: IndentWidth;
529
+ expand?: Expand;
437
530
  /**
438
531
  * The indent style applied to JavaScript (and its super languages) files.
439
532
  */
@@ -466,50 +559,55 @@ interface PartialJavascriptFormatter {
466
559
  * Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
467
560
  */
468
561
  semicolons?: Semicolons;
469
- /**
470
- * Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".
471
- */
472
- trailingComma?: TrailingCommas;
473
562
  /**
474
563
  * Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".
475
564
  */
476
565
  trailingCommas?: TrailingCommas;
477
566
  }
478
567
  type JsxRuntime = "transparent" | "reactClassic";
479
- interface PartialJavascriptLinter {
568
+ interface JsLinterConfiguration {
480
569
  /**
481
570
  * Control the linter for JavaScript (and its super languages) files.
482
571
  */
483
- enabled?: boolean;
572
+ enabled?: Bool;
484
573
  }
485
- interface PartialJavascriptOrganizeImports {}
486
- interface PartialJavascriptParser {
574
+ interface JsParserConfiguration {
487
575
  /**
488
576
  * Enables parsing of Grit metavariables. Defaults to `false`.
489
577
  */
490
- gritMetavariables?: boolean;
578
+ gritMetavariables?: Bool;
579
+ /**
580
+ * When enabled, files like `.js`/`.mjs`/`.cjs` may contain JSX syntax.
581
+
582
+ Defaults to `true`.
583
+ */
584
+ jsxEverywhere?: Bool;
491
585
  /**
492
586
  * It enables the experimental and unsafe parsing of parameter decorators
493
587
 
494
588
  These decorators belong to an old proposal, and they are subject to change.
495
589
  */
496
- unsafeParameterDecoratorsEnabled?: boolean;
590
+ unsafeParameterDecoratorsEnabled?: Bool;
497
591
  }
498
- interface PartialJsonAssists {
592
+ interface JsonAssistConfiguration {
499
593
  /**
500
- * Control the linter for JSON (and its super languages) files.
594
+ * Control the assist for JSON (and its super languages) files.
501
595
  */
502
- enabled?: boolean;
596
+ enabled?: Bool;
503
597
  }
504
- interface PartialJsonFormatter {
598
+ interface JsonFormatterConfiguration {
599
+ /**
600
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
601
+ */
602
+ bracketSpacing?: BracketSpacing;
505
603
  /**
506
604
  * Control the formatter for JSON (and its super languages) files.
507
605
  */
508
- enabled?: boolean;
606
+ enabled?: Bool;
509
607
  /**
510
- * The size of the indentation applied to JSON (and its super languages) files. Default to 2.
608
+ * Whether to expand arrays and objects on multiple lines. When set to `auto`, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to `always`, these literals are formatted on multiple lines, regardless of length of the list. When set to `never`, these literals are formatted on a single line if it fits in the line. When formatting `package.json`, Biome will use `always` unless configured otherwise. Defaults to "auto".
511
609
  */
512
- indentSize?: IndentWidth;
610
+ expand?: Expand;
513
611
  /**
514
612
  * The indent style applied to JSON (and its super languages) files.
515
613
  */
@@ -531,45 +629,46 @@ interface PartialJsonFormatter {
531
629
  */
532
630
  trailingCommas?: TrailingCommas2;
533
631
  }
534
- interface PartialJsonLinter {
632
+ interface JsonLinterConfiguration {
535
633
  /**
536
634
  * Control the linter for JSON (and its super languages) files.
537
635
  */
538
- enabled?: boolean;
636
+ enabled?: Bool;
539
637
  }
540
- interface PartialJsonParser {
638
+ interface JsonParserConfiguration {
541
639
  /**
542
640
  * Allow parsing comments in `.json` files
543
641
  */
544
- allowComments?: boolean;
642
+ allowComments?: Bool;
545
643
  /**
546
644
  * Allow parsing trailing commas in `.json` files
547
645
  */
548
- allowTrailingCommas?: boolean;
646
+ allowTrailingCommas?: Bool;
549
647
  }
648
+ type RuleDomains = { [K in RuleDomain]?: RuleDomainValue };
550
649
  interface Rules {
551
- a11y?: A11y;
552
- /**
553
- * It enables ALL rules. The rules that belong to `nursery` won't be enabled.
554
- */
555
- all?: boolean;
556
- complexity?: Complexity;
557
- correctness?: Correctness;
558
- nursery?: Nursery;
559
- performance?: Performance;
650
+ a11y?: SeverityOrGroup_for_A11y;
651
+ complexity?: SeverityOrGroup_for_Complexity;
652
+ correctness?: SeverityOrGroup_for_Correctness;
653
+ nursery?: SeverityOrGroup_for_Nursery;
654
+ performance?: SeverityOrGroup_for_Performance;
560
655
  /**
561
656
  * It enables the lint rules recommended by Biome. `true` by default.
562
657
  */
563
658
  recommended?: boolean;
564
- security?: Security;
565
- style?: Style;
566
- suspicious?: Suspicious;
659
+ security?: SeverityOrGroup_for_Security;
660
+ style?: SeverityOrGroup_for_Style;
661
+ suspicious?: SeverityOrGroup_for_Suspicious;
567
662
  }
568
663
  interface OverridePattern {
569
664
  /**
570
- * Specific configuration for the Css language
665
+ * Specific configuration for the Json language
666
+ */
667
+ assist?: OverrideAssistConfiguration;
668
+ /**
669
+ * Specific configuration for the CSS language
571
670
  */
572
- css?: PartialCssConfiguration;
671
+ css?: CssConfiguration;
573
672
  /**
574
673
  * Specific configuration for the Json language
575
674
  */
@@ -577,38 +676,43 @@ interface OverridePattern {
577
676
  /**
578
677
  * Specific configuration for the Graphql language
579
678
  */
580
- graphql?: PartialGraphqlConfiguration;
679
+ graphql?: GraphqlConfiguration;
581
680
  /**
582
- * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
681
+ * Specific configuration for the GritQL language
583
682
  */
584
- ignore?: StringSet;
683
+ grit?: GritConfiguration;
585
684
  /**
586
- * A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.
685
+ * Specific configuration for the GritQL language
587
686
  */
588
- include?: StringSet;
687
+ html?: HtmlConfiguration;
589
688
  /**
590
- * Specific configuration for the JavaScript language
689
+ * A list of glob patterns. Biome will include files/folders that will match these patterns.
591
690
  */
592
- javascript?: PartialJavascriptConfiguration;
691
+ includes?: OverrideGlobs;
593
692
  /**
594
- * Specific configuration for the Json language
693
+ * Specific configuration for the JavaScript language
595
694
  */
596
- json?: PartialJsonConfiguration;
695
+ javascript?: JsConfiguration;
597
696
  /**
598
697
  * Specific configuration for the Json language
599
698
  */
600
- linter?: OverrideLinterConfiguration;
699
+ json?: JsonConfiguration;
601
700
  /**
602
701
  * Specific configuration for the Json language
603
702
  */
604
- organizeImports?: OverrideOrganizeImportsConfiguration;
703
+ linter?: OverrideLinterConfiguration;
605
704
  }
705
+ type PluginConfiguration = string;
606
706
  type VcsClientKind = "git";
607
707
  interface Source {
608
708
  /**
609
- * Provides a whole-source code action to sort the imports in the file using import groups and natural ordering.
709
+ * Provides a code action to sort the imports and exports in the file using a built-in or custom order.
610
710
  */
611
711
  organizeImports?: RuleAssistConfiguration_for_Options;
712
+ /**
713
+ * It enables the recommended rules for this group
714
+ */
715
+ recommended?: boolean;
612
716
  /**
613
717
  * Enforce attribute sorting in JSX elements.
614
718
  */
@@ -617,18 +721,105 @@ interface Source {
617
721
  * Sorts the keys of a JSON object in natural order
618
722
  */
619
723
  useSortedKeys?: RuleAssistConfiguration_for_Null;
724
+ /**
725
+ * Enforce ordering of CSS properties and nested rules.
726
+ */
727
+ useSortedProperties?: RuleAssistConfiguration_for_Null;
620
728
  }
621
729
  type QuoteStyle = "double" | "single";
730
+ type IndentScriptAndStyle = boolean;
731
+ type WhitespaceSensitivity = "css" | "strict" | "ignore";
622
732
  type ArrowParentheses = "always" | "asNeeded";
623
733
  type QuoteProperties = "asNeeded" | "preserve";
624
734
  type Semicolons = "always" | "asNeeded";
625
735
  type TrailingCommas = "all" | "es5" | "none";
626
736
  type TrailingCommas2 = "none" | "all";
627
- interface A11y {
737
+ type RuleDomain = "react" | "test" | "solid" | "next";
738
+ type RuleDomainValue = "all" | "none" | "recommended";
739
+ type SeverityOrGroup_for_A11y = GroupPlainConfiguration | A11y;
740
+ type SeverityOrGroup_for_Complexity = GroupPlainConfiguration | Complexity;
741
+ type SeverityOrGroup_for_Correctness = GroupPlainConfiguration | Correctness;
742
+ type SeverityOrGroup_for_Nursery = GroupPlainConfiguration | Nursery;
743
+ type SeverityOrGroup_for_Performance = GroupPlainConfiguration | Performance;
744
+ type SeverityOrGroup_for_Security = GroupPlainConfiguration | Security;
745
+ type SeverityOrGroup_for_Style = GroupPlainConfiguration | Style;
746
+ type SeverityOrGroup_for_Suspicious = GroupPlainConfiguration | Suspicious;
747
+ interface OverrideAssistConfiguration {
748
+ /**
749
+ * List of actions
750
+ */
751
+ actions?: Actions;
752
+ /**
753
+ * if `false`, it disables the feature and the assist won't be executed. `true` by default
754
+ */
755
+ enabled?: Bool;
756
+ }
757
+ interface OverrideFormatterConfiguration {
758
+ /**
759
+ * The attribute position style.
760
+ */
761
+ attributePosition?: AttributePosition;
762
+ /**
763
+ * Put the `>` of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
764
+ */
765
+ bracketSameLine?: BracketSameLine;
766
+ /**
767
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
768
+ */
769
+ bracketSpacing?: BracketSpacing;
770
+ enabled?: Bool;
771
+ /**
772
+ * Whether to expand arrays and objects on multiple lines. When set to `auto`, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to `always`, these literals are formatted on multiple lines, regardless of length of the list. When set to `never`, these literals are formatted on a single line if it fits in the line. When formatting `package.json`, Biome will use `always` unless configured otherwise. Defaults to "auto".
773
+ */
774
+ expand?: Expand;
775
+ /**
776
+ * Stores whether formatting should be allowed to proceed if a given file has syntax errors
777
+ */
778
+ formatWithErrors?: Bool;
779
+ /**
780
+ * The size of the indentation, 2 by default (deprecated, use `indent-width`)
781
+ */
782
+ indentSize?: IndentWidth;
783
+ /**
784
+ * The indent style.
785
+ */
786
+ indentStyle?: IndentStyle;
787
+ /**
788
+ * The size of the indentation, 2 by default
789
+ */
790
+ indentWidth?: IndentWidth;
791
+ /**
792
+ * The type of line ending.
793
+ */
794
+ lineEnding?: LineEnding;
795
+ /**
796
+ * What's the max width of a line. Defaults to 80.
797
+ */
798
+ lineWidth?: LineWidth;
799
+ }
800
+ type OverrideGlobs = Glob[];
801
+ interface OverrideLinterConfiguration {
802
+ /**
803
+ * List of rules
804
+ */
805
+ domains?: RuleDomains;
806
+ /**
807
+ * if `false`, it disables the feature and the linter won't be executed. `true` by default
808
+ */
809
+ enabled?: Bool;
628
810
  /**
629
- * It enables ALL rules for this group.
811
+ * List of rules
630
812
  */
631
- all?: boolean;
813
+ rules?: Rules;
814
+ }
815
+ type RuleAssistConfiguration_for_Options =
816
+ | RuleAssistPlainConfiguration
817
+ | RuleAssistWithOptions_for_Options;
818
+ type RuleAssistConfiguration_for_Null =
819
+ | RuleAssistPlainConfiguration
820
+ | RuleAssistWithOptions_for_Null;
821
+ type GroupPlainConfiguration = "off" | "on" | "info" | "warn" | "error";
822
+ interface A11y {
632
823
  /**
633
824
  * Enforce that the accessKey attribute is not used on any HTML element.
634
825
  */
@@ -772,9 +963,9 @@ interface A11y {
772
963
  }
773
964
  interface Complexity {
774
965
  /**
775
- * It enables ALL rules for this group.
966
+ * Disallow unclear usage of consecutive space characters in regular expression literals
776
967
  */
777
- all?: boolean;
968
+ noAdjacentSpacesInRegex?: RuleFixConfiguration_for_Null;
778
969
  /**
779
970
  * Disallow primitive type aliases and misleading types.
780
971
  */
@@ -798,11 +989,7 @@ interface Complexity {
798
989
  /**
799
990
  * Prefer for...of statement instead of Array.forEach.
800
991
  */
801
- noForEach?: RuleConfiguration_for_Null;
802
- /**
803
- * Disallow unclear usage of consecutive space characters in regular expression literals
804
- */
805
- noMultipleSpacesInRegularExpressionLiterals?: RuleFixConfiguration_for_Null;
992
+ noForEach?: RuleConfiguration_for_NoForEachOptions;
806
993
  /**
807
994
  * This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
808
995
  */
@@ -907,12 +1094,12 @@ interface Complexity {
907
1094
  * Discard redundant terms from logical expressions.
908
1095
  */
909
1096
  useSimplifiedLogicExpression?: RuleFixConfiguration_for_Null;
910
- }
911
- interface Correctness {
912
1097
  /**
913
- * It enables ALL rules for this group.
1098
+ * Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.
914
1099
  */
915
- all?: boolean;
1100
+ useWhile?: RuleFixConfiguration_for_Null;
1101
+ }
1102
+ interface Correctness {
916
1103
  /**
917
1104
  * Prevent passing of children as props.
918
1105
  */
@@ -997,6 +1184,10 @@ interface Correctness {
997
1184
  * Disallow literal numbers that lose precision
998
1185
  */
999
1186
  noPrecisionLoss?: RuleConfiguration_for_Null;
1187
+ /**
1188
+ * Restricts imports of private exports.
1189
+ */
1190
+ noPrivateImports?: RuleConfiguration_for_NoPrivateImportsOptions;
1000
1191
  /**
1001
1192
  * Prevent the usage of the return value of React.render.
1002
1193
  */
@@ -1045,10 +1236,6 @@ interface Correctness {
1045
1236
  * Disallow unmatchable An+B selectors.
1046
1237
  */
1047
1238
  noUnmatchableAnbSelector?: RuleConfiguration_for_Null;
1048
- /**
1049
- * Avoid using unnecessary continue.
1050
- */
1051
- noUnnecessaryContinue?: RuleFixConfiguration_for_Null;
1052
1239
  /**
1053
1240
  * Disallow unreachable code
1054
1241
  */
@@ -1084,7 +1271,11 @@ interface Correctness {
1084
1271
  /**
1085
1272
  * Disallow unused variables.
1086
1273
  */
1087
- noUnusedVariables?: RuleFixConfiguration_for_Null;
1274
+ noUnusedVariables?: RuleFixConfiguration_for_NoUnusedVariablesOptions;
1275
+ /**
1276
+ * Avoid using unnecessary continue.
1277
+ */
1278
+ noUselessContinue?: RuleFixConfiguration_for_Null;
1088
1279
  /**
1089
1280
  * This rules prevents void elements (AKA self-closing elements) from having children.
1090
1281
  */
@@ -1104,7 +1295,7 @@ interface Correctness {
1104
1295
  /**
1105
1296
  * Enforce all dependencies are correctly specified in a React hook.
1106
1297
  */
1107
- useExhaustiveDependencies?: RuleConfiguration_for_UseExhaustiveDependenciesOptions;
1298
+ useExhaustiveDependencies?: RuleFixConfiguration_for_UseExhaustiveDependenciesOptions;
1108
1299
  /**
1109
1300
  * Enforce that all React hooks are being called from the Top Level component functions.
1110
1301
  */
@@ -1132,17 +1323,29 @@ interface Correctness {
1132
1323
  }
1133
1324
  interface Nursery {
1134
1325
  /**
1135
- * It enables ALL rules for this group.
1326
+ * Disallow await inside loops.
1327
+ */
1328
+ noAwaitInLoop?: RuleConfiguration_for_Null;
1329
+ /**
1330
+ * Disallow bitwise operators.
1136
1331
  */
1137
- all?: boolean;
1332
+ noBitwiseOperators?: RuleConfiguration_for_NoBitwiseOperatorsOptions;
1138
1333
  /**
1139
1334
  * Disallow use of CommonJs module system in favor of ESM style imports.
1140
1335
  */
1141
1336
  noCommonJs?: RuleConfiguration_for_Null;
1337
+ /**
1338
+ * Disallow expressions where the operation doesn't affect the value
1339
+ */
1340
+ noConstantBinaryExpression?: RuleConfiguration_for_Null;
1142
1341
  /**
1143
1342
  * Disallow a lower specificity selector from coming after a higher specificity selector.
1144
1343
  */
1145
1344
  noDescendingSpecificity?: RuleConfiguration_for_Null;
1345
+ /**
1346
+ * Disallow destructuring props inside JSX components in Solid projects.
1347
+ */
1348
+ noDestructuredProps?: RuleConfiguration_for_Null;
1146
1349
  /**
1147
1350
  * Disallow direct assignments to document.cookie.
1148
1351
  */
@@ -1160,13 +1363,13 @@ interface Nursery {
1160
1363
  */
1161
1364
  noDuplicateElseIf?: RuleConfiguration_for_Null;
1162
1365
  /**
1163
- * Disallow duplicate properties within declaration blocks.
1366
+ * No duplicated fields in GraphQL operations.
1164
1367
  */
1165
- noDuplicateProperties?: RuleConfiguration_for_Null;
1368
+ noDuplicateFields?: RuleConfiguration_for_Null;
1166
1369
  /**
1167
- * No duplicated fields in GraphQL operations.
1370
+ * Disallow duplicate properties within declaration blocks.
1168
1371
  */
1169
- noDuplicatedFields?: RuleConfiguration_for_Null;
1372
+ noDuplicateProperties?: RuleConfiguration_for_Null;
1170
1373
  /**
1171
1374
  * Disallow accessing namespace imports dynamically.
1172
1375
  */
@@ -1179,6 +1382,10 @@ interface Nursery {
1179
1382
  * Disallow exporting an imported variable.
1180
1383
  */
1181
1384
  noExportedImports?: RuleConfiguration_for_Null;
1385
+ /**
1386
+ * Require Promise-like statements to be handled appropriately.
1387
+ */
1388
+ noFloatingPromises?: RuleFixConfiguration_for_Null;
1182
1389
  /**
1183
1390
  * Disallow the use of __dirname and __filename in the global scope.
1184
1391
  */
@@ -1195,6 +1402,10 @@ interface Nursery {
1195
1402
  * Prevent usage of \<img> element in a Next.js project.
1196
1403
  */
1197
1404
  noImgElement?: RuleConfiguration_for_Null;
1405
+ /**
1406
+ * Prevent import cycles.
1407
+ */
1408
+ noImportCycles?: RuleConfiguration_for_Null;
1198
1409
  /**
1199
1410
  * Disallows the use of irregular whitespace characters.
1200
1411
  */
@@ -1207,14 +1418,22 @@ interface Nursery {
1207
1418
  * Disallow nested ternary expressions.
1208
1419
  */
1209
1420
  noNestedTernary?: RuleConfiguration_for_Null;
1421
+ /**
1422
+ * Disallow use event handlers on non-interactive elements.
1423
+ */
1424
+ noNoninteractiveElementInteractions?: RuleConfiguration_for_Null;
1210
1425
  /**
1211
1426
  * Disallow octal escape sequences in string literals
1212
1427
  */
1213
- noOctalEscape?: RuleConfiguration_for_Null;
1428
+ noOctalEscape?: RuleFixConfiguration_for_Null;
1214
1429
  /**
1215
1430
  * Disallow the use of process.env.
1216
1431
  */
1217
1432
  noProcessEnv?: RuleConfiguration_for_Null;
1433
+ /**
1434
+ * Disallow the use of process global.
1435
+ */
1436
+ noProcessGlobal?: RuleFixConfiguration_for_Null;
1218
1437
  /**
1219
1438
  * Disallow specified modules when loaded by import or require.
1220
1439
  */
@@ -1239,6 +1458,14 @@ interface Nursery {
1239
1458
  * Disallow template literal placeholder syntax in regular strings.
1240
1459
  */
1241
1460
  noTemplateCurlyInString?: RuleConfiguration_for_Null;
1461
+ /**
1462
+ * Prevents the use of the TypeScript directive @ts-ignore.
1463
+ */
1464
+ noTsIgnore?: RuleFixConfiguration_for_Null;
1465
+ /**
1466
+ * Disallow unknown at-rules.
1467
+ */
1468
+ noUnknownAtRule?: RuleConfiguration_for_Null;
1242
1469
  /**
1243
1470
  * Disallow unknown pseudo-class selectors.
1244
1471
  */
@@ -1251,10 +1478,18 @@ interface Nursery {
1251
1478
  * Disallow unknown type selectors.
1252
1479
  */
1253
1480
  noUnknownTypeSelector?: RuleConfiguration_for_Null;
1481
+ /**
1482
+ * Prevent duplicate polyfills from Polyfill.io.
1483
+ */
1484
+ noUnwantedPolyfillio?: RuleConfiguration_for_Null;
1254
1485
  /**
1255
1486
  * Disallow unnecessary escape sequence in regular expression literals.
1256
1487
  */
1257
1488
  noUselessEscapeInRegex?: RuleFixConfiguration_for_Null;
1489
+ /**
1490
+ * Disallow unnecessary escapes in string literals.
1491
+ */
1492
+ noUselessEscapeInString?: RuleFixConfiguration_for_Null;
1258
1493
  /**
1259
1494
  * Disallow unnecessary String.raw function in template string literals without any escape sequence.
1260
1495
  */
@@ -1299,6 +1534,10 @@ interface Nursery {
1299
1534
  * Require consistent accessibility modifiers on class properties and methods.
1300
1535
  */
1301
1536
  useConsistentMemberAccessibility?: RuleConfiguration_for_ConsistentMemberAccessibilityOptions;
1537
+ /**
1538
+ * Require the consistent declaration of object literals. Defaults to explicit definitions.
1539
+ */
1540
+ useConsistentObjectDefinition?: RuleConfiguration_for_UseConsistentObjectDefinitionOptions;
1302
1541
  /**
1303
1542
  * Require specifying the reason argument when using @deprecated directive
1304
1543
  */
@@ -1308,7 +1547,15 @@ interface Nursery {
1308
1547
  */
1309
1548
  useExplicitType?: RuleConfiguration_for_Null;
1310
1549
  /**
1311
- * Enforces the use of a recommended display strategy with Google Fonts.
1550
+ * Require that all exports are declared after all non-export statements.
1551
+ */
1552
+ useExportsLast?: RuleConfiguration_for_Null;
1553
+ /**
1554
+ * Enforce using Solid's \<For /> component for mapping an array to JSX elements.
1555
+ */
1556
+ useForComponent?: RuleConfiguration_for_Null;
1557
+ /**
1558
+ * Enforces the use of a recommended display strategy with Google Fonts.
1312
1559
  */
1313
1560
  useGoogleFontDisplay?: RuleConfiguration_for_Null;
1314
1561
  /**
@@ -1319,14 +1566,18 @@ interface Nursery {
1319
1566
  * Require for-in loops to include an if statement.
1320
1567
  */
1321
1568
  useGuardForIn?: RuleConfiguration_for_Null;
1322
- /**
1323
- * Disallows package private imports.
1324
- */
1325
- useImportRestrictions?: RuleConfiguration_for_Null;
1326
1569
  /**
1327
1570
  * Enforce specifying the name of GraphQL operations.
1328
1571
  */
1329
1572
  useNamedOperation?: RuleFixConfiguration_for_Null;
1573
+ /**
1574
+ * Validates that all enum values are capitalized.
1575
+ */
1576
+ useNamingConvention?: RuleConfiguration_for_Null;
1577
+ /**
1578
+ * Enforce the consistent use of the radix argument when using parseInt().
1579
+ */
1580
+ useParseIntRadix?: RuleFixConfiguration_for_Null;
1330
1581
  /**
1331
1582
  * Enforce the sorting of CSS utility classes.
1332
1583
  */
@@ -1335,6 +1586,10 @@ interface Nursery {
1335
1586
  * Enforce the use of the directive "use strict" in script files.
1336
1587
  */
1337
1588
  useStrictMode?: RuleFixConfiguration_for_Null;
1589
+ /**
1590
+ * Require a description parameter for the Symbol().
1591
+ */
1592
+ useSymbolDescription?: RuleConfiguration_for_Null;
1338
1593
  /**
1339
1594
  * Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
1340
1595
  */
@@ -1345,10 +1600,6 @@ interface Nursery {
1345
1600
  useValidAutocomplete?: RuleConfiguration_for_UseValidAutocompleteOptions;
1346
1601
  }
1347
1602
  interface Performance {
1348
- /**
1349
- * It enables ALL rules for this group.
1350
- */
1351
- all?: boolean;
1352
1603
  /**
1353
1604
  * Disallow the use of spread (...) syntax on accumulators.
1354
1605
  */
@@ -1375,10 +1626,6 @@ interface Performance {
1375
1626
  useTopLevelRegex?: RuleConfiguration_for_Null;
1376
1627
  }
1377
1628
  interface Security {
1378
- /**
1379
- * It enables ALL rules for this group.
1380
- */
1381
- all?: boolean;
1382
1629
  /**
1383
1630
  * Prevent the usage of dangerous JSX props
1384
1631
  */
@@ -1397,10 +1644,6 @@ interface Security {
1397
1644
  recommended?: boolean;
1398
1645
  }
1399
1646
  interface Style {
1400
- /**
1401
- * It enables ALL rules for this group.
1402
- */
1403
- all?: boolean;
1404
1647
  /**
1405
1648
  * Disallow the use of arguments.
1406
1649
  */
@@ -1465,10 +1708,6 @@ interface Style {
1465
1708
  * Disallow else block when the if block breaks early.
1466
1709
  */
1467
1710
  noUselessElse?: RuleFixConfiguration_for_Null;
1468
- /**
1469
- * Disallow the use of var
1470
- */
1471
- noVar?: RuleFixConfiguration_for_Null;
1472
1711
  /**
1473
1712
  * Disallow the use of yoda expressions.
1474
1713
  */
@@ -1601,16 +1840,8 @@ interface Style {
1601
1840
  * Disallow throwing non-Error values.
1602
1841
  */
1603
1842
  useThrowOnlyError?: RuleConfiguration_for_Null;
1604
- /**
1605
- * Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.
1606
- */
1607
- useWhile?: RuleFixConfiguration_for_Null;
1608
1843
  }
1609
1844
  interface Suspicious {
1610
- /**
1611
- * It enables ALL rules for this group.
1612
- */
1613
- all?: boolean;
1614
1845
  /**
1615
1846
  * Use standard constants instead of approximated literals.
1616
1847
  */
@@ -1646,7 +1877,7 @@ interface Suspicious {
1646
1877
  /**
1647
1878
  * Disallow labeled statements that are not loops.
1648
1879
  */
1649
- noConfusingLabels?: RuleConfiguration_for_Null;
1880
+ noConfusingLabels?: RuleConfiguration_for_NoConfusingLabelsOptions;
1650
1881
  /**
1651
1882
  * Disallow void type outside of generic or return types.
1652
1883
  */
@@ -1655,16 +1886,12 @@ interface Suspicious {
1655
1886
  * Disallow the use of console.
1656
1887
  */
1657
1888
  noConsole?: RuleFixConfiguration_for_NoConsoleOptions;
1658
- /**
1659
- * Disallow the use of console.log
1660
- */
1661
- noConsoleLog?: RuleFixConfiguration_for_Null;
1662
1889
  /**
1663
1890
  * Disallow TypeScript const enum
1664
1891
  */
1665
1892
  noConstEnum?: RuleFixConfiguration_for_Null;
1666
1893
  /**
1667
- * Prevents from having control characters and some escape sequences that match control characters in regular expressions.
1894
+ * Prevents from having control characters and some escape sequences that match control characters in regular expression literals.
1668
1895
  */
1669
1896
  noControlCharactersInRegex?: RuleConfiguration_for_Null;
1670
1897
  /**
@@ -1828,7 +2055,7 @@ interface Suspicious {
1828
2055
  */
1829
2056
  noSkippedTests?: RuleFixConfiguration_for_Null;
1830
2057
  /**
1831
- * Disallow sparse arrays
2058
+ * Prevents the use of sparse arrays (arrays with holes).
1832
2059
  */
1833
2060
  noSparseArray?: RuleFixConfiguration_for_Null;
1834
2061
  /**
@@ -1847,6 +2074,10 @@ interface Suspicious {
1847
2074
  * Disallow using unsafe negation.
1848
2075
  */
1849
2076
  noUnsafeNegation?: RuleFixConfiguration_for_Null;
2077
+ /**
2078
+ * Disallow the use of var
2079
+ */
2080
+ noVar?: RuleFixConfiguration_for_Null;
1850
2081
  /**
1851
2082
  * It enables the recommended rules for this group
1852
2083
  */
@@ -1880,67 +2111,31 @@ interface Suspicious {
1880
2111
  */
1881
2112
  useNumberToFixedDigitsArgument?: RuleFixConfiguration_for_Null;
1882
2113
  /**
1883
- * This rule checks that the result of a `typeof' expression is compared to a valid value.
2114
+ * This rule checks that the result of a typeof expression is compared to a valid value.
1884
2115
  */
1885
2116
  useValidTypeof?: RuleFixConfiguration_for_Null;
1886
2117
  }
1887
- interface OverrideFormatterConfiguration {
1888
- /**
1889
- * The attribute position style.
1890
- */
1891
- attributePosition?: AttributePosition;
1892
- /**
1893
- * Whether to insert spaces around brackets in object literals. Defaults to true.
1894
- */
1895
- bracketSpacing?: BracketSpacing;
1896
- enabled?: boolean;
1897
- /**
1898
- * Stores whether formatting should be allowed to proceed if a given file has syntax errors
1899
- */
1900
- formatWithErrors?: boolean;
1901
- /**
1902
- * The size of the indentation, 2 by default (deprecated, use `indent-width`)
1903
- */
1904
- indentSize?: IndentWidth;
1905
- /**
1906
- * The indent style.
1907
- */
1908
- indentStyle?: IndentStyle;
1909
- /**
1910
- * The size of the indentation, 2 by default
1911
- */
1912
- indentWidth?: IndentWidth;
2118
+ type RuleAssistPlainConfiguration = "off" | "on";
2119
+ interface RuleAssistWithOptions_for_Options {
1913
2120
  /**
1914
- * The type of line ending.
2121
+ * The severity of the emitted diagnostics by the rule
1915
2122
  */
1916
- lineEnding?: LineEnding;
2123
+ level: RuleAssistPlainConfiguration;
1917
2124
  /**
1918
- * What's the max width of a line. Defaults to 80.
2125
+ * Rule's options
1919
2126
  */
1920
- lineWidth?: LineWidth;
2127
+ options: Options;
1921
2128
  }
1922
- interface OverrideLinterConfiguration {
1923
- /**
1924
- * if `false`, it disables the feature and the linter won't be executed. `true` by default
1925
- */
1926
- enabled?: boolean;
2129
+ interface RuleAssistWithOptions_for_Null {
1927
2130
  /**
1928
- * List of rules
2131
+ * The severity of the emitted diagnostics by the rule
1929
2132
  */
1930
- rules?: Rules;
1931
- }
1932
- interface OverrideOrganizeImportsConfiguration {
2133
+ level: RuleAssistPlainConfiguration;
1933
2134
  /**
1934
- * if `false`, it disables the feature and the linter won't be executed. `true` by default
2135
+ * Rule's options
1935
2136
  */
1936
- enabled?: boolean;
2137
+ options: null;
1937
2138
  }
1938
- type RuleAssistConfiguration_for_Options =
1939
- | RuleAssistPlainConfiguration
1940
- | RuleAssistWithOptions_for_Options;
1941
- type RuleAssistConfiguration_for_Null =
1942
- | RuleAssistPlainConfiguration
1943
- | RuleAssistWithOptions_for_Null;
1944
2139
  type RuleFixConfiguration_for_Null =
1945
2140
  | RulePlainConfiguration
1946
2141
  | RuleWithFixOptions_for_Null;
@@ -1959,21 +2154,33 @@ type RuleFixConfiguration_for_ValidAriaRoleOptions =
1959
2154
  type RuleConfiguration_for_ComplexityOptions =
1960
2155
  | RulePlainConfiguration
1961
2156
  | RuleWithOptions_for_ComplexityOptions;
2157
+ type RuleConfiguration_for_NoForEachOptions =
2158
+ | RulePlainConfiguration
2159
+ | RuleWithOptions_for_NoForEachOptions;
2160
+ type RuleConfiguration_for_NoPrivateImportsOptions =
2161
+ | RulePlainConfiguration
2162
+ | RuleWithOptions_for_NoPrivateImportsOptions;
1962
2163
  type RuleConfiguration_for_NoUndeclaredDependenciesOptions =
1963
2164
  | RulePlainConfiguration
1964
2165
  | RuleWithOptions_for_NoUndeclaredDependenciesOptions;
1965
2166
  type RuleConfiguration_for_UndeclaredVariablesOptions =
1966
2167
  | RulePlainConfiguration
1967
2168
  | RuleWithOptions_for_UndeclaredVariablesOptions;
1968
- type RuleConfiguration_for_UseExhaustiveDependenciesOptions =
2169
+ type RuleFixConfiguration_for_NoUnusedVariablesOptions =
1969
2170
  | RulePlainConfiguration
1970
- | RuleWithOptions_for_UseExhaustiveDependenciesOptions;
2171
+ | RuleWithFixOptions_for_NoUnusedVariablesOptions;
2172
+ type RuleFixConfiguration_for_UseExhaustiveDependenciesOptions =
2173
+ | RulePlainConfiguration
2174
+ | RuleWithFixOptions_for_UseExhaustiveDependenciesOptions;
1971
2175
  type RuleConfiguration_for_DeprecatedHooksOptions =
1972
2176
  | RulePlainConfiguration
1973
2177
  | RuleWithOptions_for_DeprecatedHooksOptions;
1974
2178
  type RuleFixConfiguration_for_UseImportExtensionsOptions =
1975
2179
  | RulePlainConfiguration
1976
2180
  | RuleWithFixOptions_for_UseImportExtensionsOptions;
2181
+ type RuleConfiguration_for_NoBitwiseOperatorsOptions =
2182
+ | RulePlainConfiguration
2183
+ | RuleWithOptions_for_NoBitwiseOperatorsOptions;
1977
2184
  type RuleConfiguration_for_RestrictedImportsOptions =
1978
2185
  | RulePlainConfiguration
1979
2186
  | RuleWithOptions_for_RestrictedImportsOptions;
@@ -1989,6 +2196,9 @@ type RuleConfiguration_for_UseComponentExportOnlyModulesOptions =
1989
2196
  type RuleConfiguration_for_ConsistentMemberAccessibilityOptions =
1990
2197
  | RulePlainConfiguration
1991
2198
  | RuleWithOptions_for_ConsistentMemberAccessibilityOptions;
2199
+ type RuleConfiguration_for_UseConsistentObjectDefinitionOptions =
2200
+ | RulePlainConfiguration
2201
+ | RuleWithOptions_for_UseConsistentObjectDefinitionOptions;
1992
2202
  type RuleFixConfiguration_for_UtilityClassSortingOptions =
1993
2203
  | RulePlainConfiguration
1994
2204
  | RuleWithFixOptions_for_UtilityClassSortingOptions;
@@ -2010,34 +2220,19 @@ type RuleFixConfiguration_for_NamingConventionOptions =
2010
2220
  type RuleFixConfiguration_for_UseSelfClosingElementsOptions =
2011
2221
  | RulePlainConfiguration
2012
2222
  | RuleWithFixOptions_for_UseSelfClosingElementsOptions;
2223
+ type RuleConfiguration_for_NoConfusingLabelsOptions =
2224
+ | RulePlainConfiguration
2225
+ | RuleWithOptions_for_NoConfusingLabelsOptions;
2013
2226
  type RuleFixConfiguration_for_NoConsoleOptions =
2014
2227
  | RulePlainConfiguration
2015
2228
  | RuleWithFixOptions_for_NoConsoleOptions;
2016
2229
  type RuleFixConfiguration_for_NoDoubleEqualsOptions =
2017
2230
  | RulePlainConfiguration
2018
2231
  | RuleWithFixOptions_for_NoDoubleEqualsOptions;
2019
- type RuleAssistPlainConfiguration = "on" | "off";
2020
- interface RuleAssistWithOptions_for_Options {
2021
- /**
2022
- * The severity of the emitted diagnostics by the rule
2023
- */
2024
- level: RuleAssistPlainConfiguration;
2025
- /**
2026
- * Rule's options
2027
- */
2028
- options: Options;
2029
- }
2030
- interface RuleAssistWithOptions_for_Null {
2031
- /**
2032
- * The severity of the emitted diagnostics by the rule
2033
- */
2034
- level: RuleAssistPlainConfiguration;
2035
- /**
2036
- * Rule's options
2037
- */
2038
- options: null;
2232
+ interface Options {
2233
+ groups?: ImportGroups;
2039
2234
  }
2040
- type RulePlainConfiguration = "warn" | "error" | "info" | "off";
2235
+ type RulePlainConfiguration = "off" | "on" | "info" | "warn" | "error";
2041
2236
  interface RuleWithFixOptions_for_Null {
2042
2237
  /**
2043
2238
  * The kind of the code actions emitted by the rule
@@ -2110,6 +2305,26 @@ interface RuleWithOptions_for_ComplexityOptions {
2110
2305
  */
2111
2306
  options: ComplexityOptions;
2112
2307
  }
2308
+ interface RuleWithOptions_for_NoForEachOptions {
2309
+ /**
2310
+ * The severity of the emitted diagnostics by the rule
2311
+ */
2312
+ level: RulePlainConfiguration;
2313
+ /**
2314
+ * Rule's options
2315
+ */
2316
+ options: NoForEachOptions;
2317
+ }
2318
+ interface RuleWithOptions_for_NoPrivateImportsOptions {
2319
+ /**
2320
+ * The severity of the emitted diagnostics by the rule
2321
+ */
2322
+ level: RulePlainConfiguration;
2323
+ /**
2324
+ * Rule's options
2325
+ */
2326
+ options: NoPrivateImportsOptions;
2327
+ }
2113
2328
  interface RuleWithOptions_for_NoUndeclaredDependenciesOptions {
2114
2329
  /**
2115
2330
  * The severity of the emitted diagnostics by the rule
@@ -2130,7 +2345,25 @@ interface RuleWithOptions_for_UndeclaredVariablesOptions {
2130
2345
  */
2131
2346
  options: UndeclaredVariablesOptions;
2132
2347
  }
2133
- interface RuleWithOptions_for_UseExhaustiveDependenciesOptions {
2348
+ interface RuleWithFixOptions_for_NoUnusedVariablesOptions {
2349
+ /**
2350
+ * The kind of the code actions emitted by the rule
2351
+ */
2352
+ fix?: FixKind;
2353
+ /**
2354
+ * The severity of the emitted diagnostics by the rule
2355
+ */
2356
+ level: RulePlainConfiguration;
2357
+ /**
2358
+ * Rule's options
2359
+ */
2360
+ options: NoUnusedVariablesOptions;
2361
+ }
2362
+ interface RuleWithFixOptions_for_UseExhaustiveDependenciesOptions {
2363
+ /**
2364
+ * The kind of the code actions emitted by the rule
2365
+ */
2366
+ fix?: FixKind;
2134
2367
  /**
2135
2368
  * The severity of the emitted diagnostics by the rule
2136
2369
  */
@@ -2164,6 +2397,16 @@ interface RuleWithFixOptions_for_UseImportExtensionsOptions {
2164
2397
  */
2165
2398
  options: UseImportExtensionsOptions;
2166
2399
  }
2400
+ interface RuleWithOptions_for_NoBitwiseOperatorsOptions {
2401
+ /**
2402
+ * The severity of the emitted diagnostics by the rule
2403
+ */
2404
+ level: RulePlainConfiguration;
2405
+ /**
2406
+ * Rule's options
2407
+ */
2408
+ options: NoBitwiseOperatorsOptions;
2409
+ }
2167
2410
  interface RuleWithOptions_for_RestrictedImportsOptions {
2168
2411
  /**
2169
2412
  * The severity of the emitted diagnostics by the rule
@@ -2218,6 +2461,16 @@ interface RuleWithOptions_for_ConsistentMemberAccessibilityOptions {
2218
2461
  */
2219
2462
  options: ConsistentMemberAccessibilityOptions;
2220
2463
  }
2464
+ interface RuleWithOptions_for_UseConsistentObjectDefinitionOptions {
2465
+ /**
2466
+ * The severity of the emitted diagnostics by the rule
2467
+ */
2468
+ level: RulePlainConfiguration;
2469
+ /**
2470
+ * Rule's options
2471
+ */
2472
+ options: UseConsistentObjectDefinitionOptions;
2473
+ }
2221
2474
  interface RuleWithFixOptions_for_UtilityClassSortingOptions {
2222
2475
  /**
2223
2476
  * The kind of the code actions emitted by the rule
@@ -2304,6 +2557,16 @@ interface RuleWithFixOptions_for_UseSelfClosingElementsOptions {
2304
2557
  */
2305
2558
  options: UseSelfClosingElementsOptions;
2306
2559
  }
2560
+ interface RuleWithOptions_for_NoConfusingLabelsOptions {
2561
+ /**
2562
+ * The severity of the emitted diagnostics by the rule
2563
+ */
2564
+ level: RulePlainConfiguration;
2565
+ /**
2566
+ * Rule's options
2567
+ */
2568
+ options: NoConfusingLabelsOptions;
2569
+ }
2307
2570
  interface RuleWithFixOptions_for_NoConsoleOptions {
2308
2571
  /**
2309
2572
  * The kind of the code actions emitted by the rule
@@ -2332,10 +2595,7 @@ interface RuleWithFixOptions_for_NoDoubleEqualsOptions {
2332
2595
  */
2333
2596
  options: NoDoubleEqualsOptions;
2334
2597
  }
2335
- interface Options {
2336
- importGroups?: ImportGroup[];
2337
- legacy?: boolean;
2338
- }
2598
+ type ImportGroups = ImportGroup[];
2339
2599
  type FixKind = "none" | "safe" | "unsafe";
2340
2600
  interface AllowDomainOptions {
2341
2601
  /**
@@ -2367,6 +2627,20 @@ interface ComplexityOptions {
2367
2627
  */
2368
2628
  maxAllowedComplexity?: number;
2369
2629
  }
2630
+ interface NoForEachOptions {
2631
+ /**
2632
+ * A list of variable names allowed for `forEach` calls.
2633
+ */
2634
+ allowedIdentifiers: string[];
2635
+ }
2636
+ interface NoPrivateImportsOptions {
2637
+ /**
2638
+ * The default visibility to assume for symbols without visibility tag.
2639
+
2640
+ Default: **public**.
2641
+ */
2642
+ defaultVisibility?: Visibility;
2643
+ }
2370
2644
  interface NoUndeclaredDependenciesOptions {
2371
2645
  /**
2372
2646
  * If set to `false`, then the rule will show an error when `devDependencies` are imported. Defaults to `true`.
@@ -2387,6 +2661,12 @@ interface UndeclaredVariablesOptions {
2387
2661
  */
2388
2662
  checkTypes?: boolean;
2389
2663
  }
2664
+ interface NoUnusedVariablesOptions {
2665
+ /**
2666
+ * Whether to ignore unused variables from an object destructuring with a spread (i.e.: whether `a` and `b` in `const { a, b, ...rest } = obj` should be ignored by this rule).
2667
+ */
2668
+ ignoreRestSiblings?: boolean;
2669
+ }
2390
2670
  interface UseExhaustiveDependenciesOptions {
2391
2671
  /**
2392
2672
  * List of hooks of which the dependencies should be validated.
@@ -2404,18 +2684,24 @@ interface UseExhaustiveDependenciesOptions {
2404
2684
  interface DeprecatedHooksOptions {}
2405
2685
  interface UseImportExtensionsOptions {
2406
2686
  /**
2407
- * A map of custom import extension mappings, where the key is the inspected file extension, and the value is a pair of `module` extension and `component` import extension
2687
+ * If `true`, the suggested extension is always `.js` regardless of what extension the source file has in your project.
2688
+ */
2689
+ forceJsExtensions?: boolean;
2690
+ }
2691
+ interface NoBitwiseOperatorsOptions {
2692
+ /**
2693
+ * Allows a list of bitwise operators to be used as exceptions.
2408
2694
  */
2409
- suggestedExtensions?: {};
2695
+ allow: string[];
2410
2696
  }
2411
2697
  interface RestrictedImportsOptions {
2412
2698
  /**
2413
- * A list of names that should trigger the rule
2699
+ * A list of import paths that should trigger the rule.
2414
2700
  */
2415
- paths: {};
2701
+ paths: Record<string, CustomRestrictedImport>;
2416
2702
  }
2417
2703
  interface NoRestrictedTypesOptions {
2418
- types?: {};
2704
+ types?: Record<string, CustomRestrictedType>;
2419
2705
  }
2420
2706
  interface NoSecretsOptions {
2421
2707
  /**
@@ -2436,6 +2722,12 @@ interface UseComponentExportOnlyModulesOptions {
2436
2722
  interface ConsistentMemberAccessibilityOptions {
2437
2723
  accessibility?: Accessibility;
2438
2724
  }
2725
+ interface UseConsistentObjectDefinitionOptions {
2726
+ /**
2727
+ * The preferred syntax to enforce.
2728
+ */
2729
+ syntax?: ObjectPropertySyntax;
2730
+ }
2439
2731
  interface UtilityClassSortingOptions {
2440
2732
  /**
2441
2733
  * Additional attributes that will be sorted.
@@ -2484,10 +2776,6 @@ interface NamingConventionOptions {
2484
2776
  * Custom conventions.
2485
2777
  */
2486
2778
  conventions: Convention[];
2487
- /**
2488
- * Allowed cases for _TypeScript_ `enum` member names.
2489
- */
2490
- enumMemberCase: Format;
2491
2779
  /**
2492
2780
  * If `false`, then non-ASCII characters are allowed.
2493
2781
  */
@@ -2500,6 +2788,12 @@ interface NamingConventionOptions {
2500
2788
  interface UseSelfClosingElementsOptions {
2501
2789
  ignoreHtmlElements?: boolean;
2502
2790
  }
2791
+ interface NoConfusingLabelsOptions {
2792
+ /**
2793
+ * A list of (non-confusing) labels that should be allowed
2794
+ */
2795
+ allowedLabels: string[];
2796
+ }
2503
2797
  interface NoConsoleOptions {
2504
2798
  /**
2505
2799
  * Allowed calls on the console object.
@@ -2514,7 +2808,11 @@ If `false`, no such exception will be made.
2514
2808
  */
2515
2809
  ignoreNull: boolean;
2516
2810
  }
2517
- type ImportGroup = PredefinedImportGroup | Regex;
2811
+ type ImportGroup =
2812
+ | PredefinedImportGroup
2813
+ | ImportSourceGlob
2814
+ | ImportSourceGlob[];
2815
+ type Visibility = "public" | "package" | "private";
2518
2816
  type DependencyAvailability = boolean | string[];
2519
2817
  interface Hook {
2520
2818
  /**
@@ -2542,7 +2840,10 @@ For example, for React's `useRef()` hook the value would be `true`, while for `u
2542
2840
  */
2543
2841
  stableResult?: StableHookResult;
2544
2842
  }
2843
+ type CustomRestrictedImport = string | CustomRestrictedImportOptions;
2844
+ type CustomRestrictedType = string | CustomRestrictedTypeOptions;
2545
2845
  type Accessibility = "noPublic" | "explicit" | "none";
2846
+ type ObjectPropertySyntax = "explicit" | "shorthand";
2546
2847
  type ConsistentArrayType = "shorthand" | "generic";
2547
2848
  type FilenameCases = FilenameCase[];
2548
2849
  type Regex = string;
@@ -2560,9 +2861,35 @@ interface Convention {
2560
2861
  */
2561
2862
  selector: Selector;
2562
2863
  }
2563
- type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2564
- type PredefinedImportGroup = ":blank-line:" | ":bun:" | ":node:" | ":types:";
2864
+ type PredefinedImportGroup =
2865
+ | ":BLANK_LINE:"
2866
+ | ":ALIAS:"
2867
+ | ":BUN:"
2868
+ | ":NODE:"
2869
+ | ":PACKAGE:"
2870
+ | ":PACKAGE_WITH_PROTOCOL:"
2871
+ | ":PATH:"
2872
+ | ":URL:";
2873
+ type ImportSourceGlob = Glob;
2565
2874
  type StableHookResult = boolean | number[];
2875
+ interface CustomRestrictedImportOptions {
2876
+ /**
2877
+ * Names of the exported members that allowed to be not be used.
2878
+ */
2879
+ allowImportNames: string[];
2880
+ /**
2881
+ * Names of the exported members that should not be used.
2882
+ */
2883
+ importNames: string[];
2884
+ /**
2885
+ * The message to display when this module is imported.
2886
+ */
2887
+ message: string;
2888
+ }
2889
+ interface CustomRestrictedTypeOptions {
2890
+ message?: string;
2891
+ use?: string;
2892
+ }
2566
2893
  type FilenameCase =
2567
2894
  | "camelCase"
2568
2895
  | "export"
@@ -2584,6 +2911,7 @@ interface Selector {
2584
2911
  */
2585
2912
  scope: Scope;
2586
2913
  }
2914
+ type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2587
2915
  type Kind =
2588
2916
  | "class"
2589
2917
  | "enum"
@@ -2631,111 +2959,8 @@ type RestrictedModifier =
2631
2959
  | "protected"
2632
2960
  | "readonly"
2633
2961
  | "static";
2634
- interface RegisterProjectFolderParams {
2635
- path?: string;
2636
- setAsCurrentWorkspace: boolean;
2637
- }
2638
- type ProjectKey = string;
2639
- interface SetManifestForProjectParams {
2640
- content: string;
2641
- manifest_path: BiomePath;
2642
- version: number;
2643
- }
2644
- interface OpenFileParams {
2645
- content: string;
2646
- document_file_source?: DocumentFileSource;
2647
- path: BiomePath;
2648
- version: number;
2649
- }
2650
- type DocumentFileSource =
2651
- | "Unknown"
2652
- | { Js: JsFileSource }
2653
- | { Json: JsonFileSource }
2654
- | { Css: CssFileSource }
2655
- | { Graphql: GraphqlFileSource }
2656
- | { Html: HtmlFileSource }
2657
- | { Grit: GritFileSource };
2658
- interface JsFileSource {
2659
- /**
2660
- * Used to mark if the source is being used for an Astro, Svelte or Vue file
2661
- */
2662
- embedding_kind: EmbeddingKind;
2663
- language: Language;
2664
- module_kind: ModuleKind;
2665
- variant: LanguageVariant;
2666
- version: LanguageVersion;
2667
- }
2668
- interface JsonFileSource {
2669
- allow_comments: boolean;
2670
- allow_trailing_commas: boolean;
2671
- }
2672
- interface CssFileSource {
2673
- variant: CssVariant;
2674
- }
2675
- interface GraphqlFileSource {
2676
- variant: GraphqlVariant;
2677
- }
2678
- interface HtmlFileSource {
2679
- variant: HtmlVariant;
2680
- }
2681
- interface GritFileSource {
2682
- variant: GritVariant;
2683
- }
2684
- type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
2685
- type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
2686
- type ModuleKind = "Script" | "Module";
2687
- type LanguageVariant = "Standard" | "StandardRestricted" | "Jsx";
2688
- type LanguageVersion = "ES2022" | "ESNext";
2689
- type CssVariant = "Standard";
2690
- type GraphqlVariant = "Standard";
2691
- type HtmlVariant = "Standard" | "Astro";
2692
- type GritVariant = "Standard";
2693
- interface ChangeFileParams {
2694
- content: string;
2695
- path: BiomePath;
2696
- version: number;
2697
- }
2698
- interface CloseFileParams {
2699
- path: BiomePath;
2700
- }
2701
- interface GetSyntaxTreeParams {
2702
- path: BiomePath;
2703
- }
2704
- interface GetSyntaxTreeResult {
2705
- ast: string;
2706
- cst: string;
2707
- }
2708
- interface OrganizeImportsParams {
2709
- path: BiomePath;
2710
- }
2711
- interface OrganizeImportsResult {
2712
- code: string;
2713
- }
2714
- interface GetFileContentParams {
2715
- path: BiomePath;
2716
- }
2717
- interface GetControlFlowGraphParams {
2718
- cursor: TextSize;
2719
- path: BiomePath;
2720
- }
2721
- type TextSize = number;
2722
- interface GetFormatterIRParams {
2723
- path: BiomePath;
2724
- }
2725
- interface PullDiagnosticsParams {
2726
- categories: RuleCategories;
2727
- max_diagnostics: number;
2728
- only: RuleCode[];
2729
- path: BiomePath;
2730
- skip: RuleCode[];
2731
- }
2732
- type RuleCategories = RuleCategory[];
2733
- type RuleCode = string;
2734
- type RuleCategory = "Syntax" | "Lint" | "Action" | "Transformation";
2735
- interface PullDiagnosticsResult {
2962
+ interface UpdateSettingsResult {
2736
2963
  diagnostics: Diagnostic[];
2737
- errors: number;
2738
- skipped_diagnostics: number;
2739
2964
  }
2740
2965
  interface Diagnostic {
2741
2966
  advices: Advices;
@@ -2792,7 +3017,7 @@ type Category =
2792
3017
  | "lint/complexity/noExcessiveNestedTestSuites"
2793
3018
  | "lint/complexity/noExtraBooleanCast"
2794
3019
  | "lint/complexity/noForEach"
2795
- | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
3020
+ | "lint/complexity/noAdjacentSpacesInRegex"
2796
3021
  | "lint/complexity/noStaticOnlyClass"
2797
3022
  | "lint/complexity/noThisInStatic"
2798
3023
  | "lint/complexity/noUselessCatch"
@@ -2818,6 +3043,7 @@ type Category =
2818
3043
  | "lint/complexity/useRegexLiterals"
2819
3044
  | "lint/complexity/useSimpleNumberKeys"
2820
3045
  | "lint/complexity/useSimplifiedLogicExpression"
3046
+ | "lint/complexity/useWhile"
2821
3047
  | "lint/correctness/noChildrenProp"
2822
3048
  | "lint/correctness/noConstAssign"
2823
3049
  | "lint/correctness/noConstantCondition"
@@ -2839,6 +3065,7 @@ type Category =
2839
3065
  | "lint/correctness/noNodejsModules"
2840
3066
  | "lint/correctness/noNonoctalDecimalEscape"
2841
3067
  | "lint/correctness/noPrecisionLoss"
3068
+ | "lint/correctness/noPrivateImports"
2842
3069
  | "lint/correctness/noRenderReturnValue"
2843
3070
  | "lint/correctness/noSelfAssign"
2844
3071
  | "lint/correctness/noSetterReturn"
@@ -2851,7 +3078,7 @@ type Category =
2851
3078
  | "lint/correctness/noUnknownProperty"
2852
3079
  | "lint/correctness/noUnknownUnit"
2853
3080
  | "lint/correctness/noUnmatchableAnbSelector"
2854
- | "lint/correctness/noUnnecessaryContinue"
3081
+ | "lint/correctness/noUselessContinue"
2855
3082
  | "lint/correctness/noUnreachable"
2856
3083
  | "lint/correctness/noUnreachableSuper"
2857
3084
  | "lint/correctness/noUnsafeFinally"
@@ -2872,10 +3099,14 @@ type Category =
2872
3099
  | "lint/correctness/useValidForDirection"
2873
3100
  | "lint/correctness/useYield"
2874
3101
  | "lint/nursery/colorNoInvalidHex"
3102
+ | "lint/nursery/noAwaitInLoop"
3103
+ | "lint/nursery/noBitwiseOperators"
2875
3104
  | "lint/nursery/noColorInvalidHex"
2876
3105
  | "lint/nursery/noCommonJs"
2877
3106
  | "lint/nursery/noConsole"
3107
+ | "lint/nursery/noConstantBinaryExpression"
2878
3108
  | "lint/nursery/noDescendingSpecificity"
3109
+ | "lint/nursery/noDestructuredProps"
2879
3110
  | "lint/nursery/noDocumentCookie"
2880
3111
  | "lint/nursery/noDocumentImportInPage"
2881
3112
  | "lint/nursery/noDoneCallback"
@@ -2883,14 +3114,16 @@ type Category =
2883
3114
  | "lint/nursery/noDuplicateCustomProperties"
2884
3115
  | "lint/nursery/noDuplicateElseIf"
2885
3116
  | "lint/nursery/noDuplicateProperties"
2886
- | "lint/nursery/noDuplicatedFields"
3117
+ | "lint/nursery/noDuplicateFields"
2887
3118
  | "lint/nursery/noDynamicNamespaceImportAccess"
2888
3119
  | "lint/nursery/noEnum"
2889
3120
  | "lint/nursery/noExportedImports"
3121
+ | "lint/nursery/noFloatingPromises"
2890
3122
  | "lint/nursery/noGlobalDirnameFilename"
2891
3123
  | "lint/nursery/noHeadElement"
2892
3124
  | "lint/nursery/noHeadImportInDocument"
2893
3125
  | "lint/nursery/noImgElement"
3126
+ | "lint/nursery/noImportCycles"
2894
3127
  | "lint/nursery/noImportantInKeyframe"
2895
3128
  | "lint/nursery/noInvalidDirectionInLinearGradient"
2896
3129
  | "lint/nursery/noInvalidGridAreas"
@@ -2899,8 +3132,10 @@ type Category =
2899
3132
  | "lint/nursery/noMissingGenericFamilyKeyword"
2900
3133
  | "lint/nursery/noMissingVarFunction"
2901
3134
  | "lint/nursery/noNestedTernary"
3135
+ | "lint/nursery/noNoninteractiveElementInteractions"
2902
3136
  | "lint/nursery/noOctalEscape"
2903
3137
  | "lint/nursery/noProcessEnv"
3138
+ | "lint/nursery/noProcessGlobal"
2904
3139
  | "lint/nursery/noReactSpecificProps"
2905
3140
  | "lint/nursery/noRestrictedImports"
2906
3141
  | "lint/nursery/noRestrictedTypes"
@@ -2909,7 +3144,9 @@ type Category =
2909
3144
  | "lint/nursery/noStaticElementInteractions"
2910
3145
  | "lint/nursery/noSubstr"
2911
3146
  | "lint/nursery/noTemplateCurlyInString"
3147
+ | "lint/nursery/noTsIgnore"
2912
3148
  | "lint/nursery/noUndeclaredDependencies"
3149
+ | "lint/nursery/noUnknownAtRule"
2913
3150
  | "lint/nursery/noUnknownFunction"
2914
3151
  | "lint/nursery/noUnknownMediaFeatureName"
2915
3152
  | "lint/nursery/noUnknownProperty"
@@ -2921,7 +3158,9 @@ type Category =
2921
3158
  | "lint/nursery/noUnknownUnit"
2922
3159
  | "lint/nursery/noUnmatchableAnbSelector"
2923
3160
  | "lint/nursery/noUnusedFunctionParameters"
3161
+ | "lint/nursery/noUnwantedPolyfillio"
2924
3162
  | "lint/nursery/noUselessEscapeInRegex"
3163
+ | "lint/nursery/noUselessEscapeInString"
2925
3164
  | "lint/nursery/noUselessStringRaw"
2926
3165
  | "lint/nursery/noUselessUndefined"
2927
3166
  | "lint/nursery/noValueAtRule"
@@ -2933,17 +3172,24 @@ type Category =
2933
3172
  | "lint/nursery/useComponentExportOnlyModules"
2934
3173
  | "lint/nursery/useConsistentCurlyBraces"
2935
3174
  | "lint/nursery/useConsistentMemberAccessibility"
3175
+ | "lint/nursery/useConsistentObjectDefinition"
2936
3176
  | "lint/nursery/useDeprecatedReason"
2937
3177
  | "lint/nursery/useExplicitFunctionReturnType"
2938
3178
  | "lint/nursery/useExplicitType"
3179
+ | "lint/nursery/useExportsLast"
3180
+ | "lint/nursery/useForComponent"
2939
3181
  | "lint/nursery/useGoogleFontDisplay"
2940
3182
  | "lint/nursery/useGoogleFontPreconnect"
2941
3183
  | "lint/nursery/useGuardForIn"
2942
3184
  | "lint/nursery/useImportRestrictions"
2943
3185
  | "lint/nursery/useJsxCurlyBraceConvention"
2944
3186
  | "lint/nursery/useNamedOperation"
3187
+ | "lint/nursery/useNamingConvention"
3188
+ | "lint/nursery/useParseIntRadix"
2945
3189
  | "lint/nursery/useSortedClasses"
3190
+ | "lint/nursery/useSortedProperties"
2946
3191
  | "lint/nursery/useStrictMode"
3192
+ | "lint/nursery/useSymbolDescription"
2947
3193
  | "lint/nursery/useTrimStartEnd"
2948
3194
  | "lint/nursery/useValidAutocomplete"
2949
3195
  | "lint/performance/noAccumulatingSpread"
@@ -2970,7 +3216,6 @@ type Category =
2970
3216
  | "lint/style/noShoutyConstants"
2971
3217
  | "lint/style/noUnusedTemplateLiteral"
2972
3218
  | "lint/style/noUselessElse"
2973
- | "lint/style/noVar"
2974
3219
  | "lint/style/noYodaExpression"
2975
3220
  | "lint/style/useAsConstAssertion"
2976
3221
  | "lint/style/useBlockStatements"
@@ -3003,7 +3248,6 @@ type Category =
3003
3248
  | "lint/style/useTemplate"
3004
3249
  | "lint/style/useThrowNewError"
3005
3250
  | "lint/style/useThrowOnlyError"
3006
- | "lint/style/useWhile"
3007
3251
  | "lint/suspicious/noApproximativeNumericConstant"
3008
3252
  | "lint/suspicious/noArrayIndexKey"
3009
3253
  | "lint/suspicious/noAssignInExpressions"
@@ -3015,7 +3259,6 @@ type Category =
3015
3259
  | "lint/suspicious/noConfusingLabels"
3016
3260
  | "lint/suspicious/noConfusingVoidType"
3017
3261
  | "lint/suspicious/noConsole"
3018
- | "lint/suspicious/noConsoleLog"
3019
3262
  | "lint/suspicious/noConstEnum"
3020
3263
  | "lint/suspicious/noControlCharactersInRegex"
3021
3264
  | "lint/suspicious/noDebugger"
@@ -3063,6 +3306,7 @@ type Category =
3063
3306
  | "lint/suspicious/noThenProperty"
3064
3307
  | "lint/suspicious/noUnsafeDeclarationMerging"
3065
3308
  | "lint/suspicious/noUnsafeNegation"
3309
+ | "lint/suspicious/noVar"
3066
3310
  | "lint/suspicious/useAwait"
3067
3311
  | "lint/suspicious/useDefaultSwitchClauseLast"
3068
3312
  | "lint/suspicious/useErrorMessage"
@@ -3071,7 +3315,7 @@ type Category =
3071
3315
  | "lint/suspicious/useNamespaceKeyword"
3072
3316
  | "lint/suspicious/useNumberToFixedDigitsArgument"
3073
3317
  | "lint/suspicious/useValidTypeof"
3074
- | "assists/source/useSortedKeys"
3318
+ | "assist/source/useSortedKeys"
3075
3319
  | "syntax/correctness/noTypeOnlyImportAttributes"
3076
3320
  | "syntax/correctness/noSuperWithoutExtends"
3077
3321
  | "syntax/correctness/noInitializerWithDefinite"
@@ -3082,10 +3326,10 @@ type Category =
3082
3326
  | "ci"
3083
3327
  | "stdin"
3084
3328
  | "configuration"
3085
- | "organizeImports"
3086
- | "assists"
3329
+ | "assist"
3087
3330
  | "migrate"
3088
3331
  | "deserialize"
3332
+ | "plugin"
3089
3333
  | "project"
3090
3334
  | "search"
3091
3335
  | "internalError/io"
@@ -3093,8 +3337,8 @@ type Category =
3093
3337
  | "internalError/panic"
3094
3338
  | "reporter/parse"
3095
3339
  | "reporter/format"
3096
- | "reporter/analyzer"
3097
- | "reporter/organizeImports"
3340
+ | "reporter/assist"
3341
+ | "reporter/linter"
3098
3342
  | "parse"
3099
3343
  | "lint"
3100
3344
  | "lint/a11y"
@@ -3105,11 +3349,12 @@ type Category =
3105
3349
  | "lint/security"
3106
3350
  | "lint/style"
3107
3351
  | "lint/suspicious"
3352
+ | "lint/plugin"
3108
3353
  | "suppressions/parse"
3109
3354
  | "suppressions/unknownGroup"
3110
3355
  | "suppressions/unknownRule"
3111
3356
  | "suppressions/unused"
3112
- | "suppressions/deprecatedSuppressionComment"
3357
+ | "suppressions/incorrect"
3113
3358
  | "args/fileNotFound"
3114
3359
  | "flags/invalid"
3115
3360
  | "semanticTests";
@@ -3147,6 +3392,7 @@ interface TextEdit {
3147
3392
  ops: CompressedOp[];
3148
3393
  }
3149
3394
  type Backtrace = BacktraceFrame[];
3395
+ type TextSize = number;
3150
3396
  type MarkupElement =
3151
3397
  | "Emphasis"
3152
3398
  | "Dim"
@@ -3175,26 +3421,158 @@ interface BacktraceSymbol {
3175
3421
  lineno?: number;
3176
3422
  name?: string;
3177
3423
  }
3424
+ interface OpenProjectParams {
3425
+ /**
3426
+ * Whether the folder should be opened as a project, even if no `biome.json` can be found.
3427
+ */
3428
+ openUninitialized: boolean;
3429
+ /**
3430
+ * The path to open
3431
+ */
3432
+ path: BiomePath;
3433
+ }
3434
+ interface OpenFileParams {
3435
+ content: FileContent;
3436
+ documentFileSource?: DocumentFileSource;
3437
+ path: BiomePath;
3438
+ /**
3439
+ * Set to `true` to persist the node cache used during parsing, in order to speed up subsequent reparsing if the document has been edited.
3440
+
3441
+ This should only be enabled if reparsing is to be expected, such as when the file is opened through the LSP Proxy.
3442
+ */
3443
+ persistNodeCache?: boolean;
3444
+ projectKey: ProjectKey;
3445
+ }
3446
+ type FileContent =
3447
+ | { content: string; type: "fromClient"; version: number }
3448
+ | { type: "fromServer" };
3449
+ type DocumentFileSource =
3450
+ | "Ignore"
3451
+ | "Unknown"
3452
+ | { Js: JsFileSource }
3453
+ | { Json: JsonFileSource }
3454
+ | { Css: CssFileSource }
3455
+ | { Graphql: GraphqlFileSource }
3456
+ | { Html: HtmlFileSource }
3457
+ | { Grit: GritFileSource };
3458
+ interface JsFileSource {
3459
+ /**
3460
+ * Used to mark if the source is being used for an Astro, Svelte or Vue file
3461
+ */
3462
+ embedding_kind: EmbeddingKind;
3463
+ language: Language;
3464
+ module_kind: ModuleKind;
3465
+ variant: LanguageVariant;
3466
+ version: LanguageVersion;
3467
+ }
3468
+ interface JsonFileSource {
3469
+ allowComments: boolean;
3470
+ allowTrailingCommas: boolean;
3471
+ variant: JsonFileVariant;
3472
+ }
3473
+ interface CssFileSource {
3474
+ variant: CssVariant;
3475
+ }
3476
+ interface GraphqlFileSource {
3477
+ variant: GraphqlVariant;
3478
+ }
3479
+ interface HtmlFileSource {
3480
+ variant: HtmlVariant;
3481
+ }
3482
+ interface GritFileSource {
3483
+ variant: GritVariant;
3484
+ }
3485
+ type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
3486
+ type Language = "javaScript" | { typeScript: { definition_file: boolean } };
3487
+ type ModuleKind = "script" | "module";
3488
+ type LanguageVariant = "standard" | "standardRestricted" | "jsx";
3489
+ type LanguageVersion = "eS2022" | "eSNext";
3490
+ type JsonFileVariant = "standard" | "jsonc";
3491
+ type CssVariant = "standard";
3492
+ type GraphqlVariant = "standard";
3493
+ type HtmlVariant = "Standard" | "Astro";
3494
+ type GritVariant = "Standard";
3495
+ interface ChangeFileParams {
3496
+ content: string;
3497
+ path: BiomePath;
3498
+ projectKey: ProjectKey;
3499
+ version: number;
3500
+ }
3501
+ interface CloseFileParams {
3502
+ path: BiomePath;
3503
+ projectKey: ProjectKey;
3504
+ }
3505
+ interface GetSyntaxTreeParams {
3506
+ path: BiomePath;
3507
+ projectKey: ProjectKey;
3508
+ }
3509
+ interface GetSyntaxTreeResult {
3510
+ ast: string;
3511
+ cst: string;
3512
+ }
3513
+ interface CheckFileSizeParams {
3514
+ path: BiomePath;
3515
+ projectKey: ProjectKey;
3516
+ }
3517
+ interface CheckFileSizeResult {
3518
+ fileSize: number;
3519
+ limit: number;
3520
+ }
3521
+ interface GetFileContentParams {
3522
+ path: BiomePath;
3523
+ projectKey: ProjectKey;
3524
+ }
3525
+ interface GetControlFlowGraphParams {
3526
+ cursor: TextSize;
3527
+ path: BiomePath;
3528
+ projectKey: ProjectKey;
3529
+ }
3530
+ interface GetFormatterIRParams {
3531
+ path: BiomePath;
3532
+ projectKey: ProjectKey;
3533
+ }
3534
+ interface PullDiagnosticsParams {
3535
+ categories: RuleCategories;
3536
+ /**
3537
+ * Rules to apply on top of the configuration
3538
+ */
3539
+ enabledRules?: RuleCode[];
3540
+ maxDiagnostics: number;
3541
+ only?: RuleCode[];
3542
+ path: BiomePath;
3543
+ projectKey: ProjectKey;
3544
+ skip?: RuleCode[];
3545
+ }
3546
+ type RuleCategories = RuleCategory[];
3547
+ type RuleCode = string;
3548
+ type RuleCategory = "syntax" | "lint" | "action" | "transformation";
3549
+ interface PullDiagnosticsResult {
3550
+ diagnostics: Diagnostic[];
3551
+ errors: number;
3552
+ skippedDiagnostics: number;
3553
+ }
3178
3554
  interface PullActionsParams {
3179
- only: RuleCode[];
3555
+ enabledRules?: RuleCode[];
3556
+ only?: RuleCode[];
3180
3557
  path: BiomePath;
3558
+ projectKey: ProjectKey;
3181
3559
  range?: TextRange;
3182
- skip: RuleCode[];
3183
- suppression_reason?: string;
3560
+ skip?: RuleCode[];
3561
+ suppressionReason?: string;
3184
3562
  }
3185
3563
  interface PullActionsResult {
3186
3564
  actions: CodeAction[];
3187
3565
  }
3188
3566
  interface CodeAction {
3189
3567
  category: ActionCategory;
3190
- rule_name?: [string, string];
3568
+ ruleName?: [string, string];
3191
3569
  suggestion: CodeSuggestion;
3192
3570
  }
3193
3571
  type ActionCategory =
3194
- | { QuickFix: string }
3195
- | { Refactor: RefactorKind }
3196
- | { Source: SourceActionKind }
3197
- | { Other: string };
3572
+ | { quickFix: string }
3573
+ | { refactor: RefactorKind }
3574
+ | { source: SourceActionKind }
3575
+ | { other: OtherActionCategory };
3198
3576
  interface CodeSuggestion {
3199
3577
  applicability: Applicability;
3200
3578
  labels: TextRange[];
@@ -3203,25 +3581,30 @@ interface CodeSuggestion {
3203
3581
  suggestion: TextEdit;
3204
3582
  }
3205
3583
  type RefactorKind =
3206
- | "None"
3207
- | "Extract"
3208
- | "Inline"
3209
- | "Rewrite"
3210
- | { Other: string };
3584
+ | "none"
3585
+ | "extract"
3586
+ | "inline"
3587
+ | "rewrite"
3588
+ | { other: string };
3211
3589
  type SourceActionKind =
3212
- | "FixAll"
3213
- | "None"
3214
- | "OrganizeImports"
3215
- | { Other: string };
3216
- type Applicability = "Always" | "MaybeIncorrect";
3590
+ | "fixAll"
3591
+ | "none"
3592
+ | "organizeImports"
3593
+ | { other: string };
3594
+ type OtherActionCategory =
3595
+ | "inlineSuppression"
3596
+ | "toplevelSuppression"
3597
+ | { generic: string };
3598
+ type Applicability = "always" | "maybeIncorrect";
3217
3599
  interface FormatFileParams {
3218
3600
  path: BiomePath;
3601
+ projectKey: ProjectKey;
3219
3602
  }
3220
3603
  interface Printed {
3221
3604
  code: string;
3222
3605
  range?: TextRange;
3223
3606
  sourcemap: SourceMarker[];
3224
- verbatim_ranges: TextRange[];
3607
+ verbatimRanges: TextRange[];
3225
3608
  }
3226
3609
  interface SourceMarker {
3227
3610
  /**
@@ -3235,22 +3618,29 @@ interface SourceMarker {
3235
3618
  }
3236
3619
  interface FormatRangeParams {
3237
3620
  path: BiomePath;
3621
+ projectKey: ProjectKey;
3238
3622
  range: TextRange;
3239
3623
  }
3240
3624
  interface FormatOnTypeParams {
3241
3625
  offset: TextSize;
3242
3626
  path: BiomePath;
3627
+ projectKey: ProjectKey;
3243
3628
  }
3244
3629
  interface FixFileParams {
3245
- fix_file_mode: FixFileMode;
3246
- only: RuleCode[];
3630
+ /**
3631
+ * Rules to apply to the file
3632
+ */
3633
+ enabledRules?: RuleCode[];
3634
+ fixFileMode: FixFileMode;
3635
+ only?: RuleCode[];
3247
3636
  path: BiomePath;
3248
- rule_categories: RuleCategories;
3249
- should_format: boolean;
3250
- skip: RuleCode[];
3251
- suppression_reason?: string;
3637
+ projectKey: ProjectKey;
3638
+ ruleCategories: RuleCategories;
3639
+ shouldFormat: boolean;
3640
+ skip?: RuleCode[];
3641
+ suppressionReason?: string;
3252
3642
  }
3253
- type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes" | "ApplySuppressions";
3643
+ type FixFileMode = "safeFixes" | "safeAndUnsafeFixes" | "applySuppressions";
3254
3644
  interface FixFileResult {
3255
3645
  /**
3256
3646
  * List of all the code actions applied to the file
@@ -3267,7 +3657,7 @@ interface FixFileResult {
3267
3657
  /**
3268
3658
  * number of skipped suggested fixes
3269
3659
  */
3270
- skipped_suggested_fixes: number;
3660
+ skippedSuggestedFixes: number;
3271
3661
  }
3272
3662
  interface FixAction {
3273
3663
  /**
@@ -3280,9 +3670,10 @@ interface FixAction {
3280
3670
  rule_name?: [string, string];
3281
3671
  }
3282
3672
  interface RenameParams {
3283
- new_name: string;
3673
+ newName: string;
3284
3674
  path: BiomePath;
3285
- symbol_at: TextSize;
3675
+ projectKey: ProjectKey;
3676
+ symbolAt: TextSize;
3286
3677
  }
3287
3678
  interface RenameResult {
3288
3679
  /**
@@ -3294,116 +3685,55 @@ interface RenameResult {
3294
3685
  */
3295
3686
  range: TextRange;
3296
3687
  }
3688
+ interface ParsePatternParams {
3689
+ defaultLanguage: GritTargetLanguage;
3690
+ pattern: string;
3691
+ }
3692
+ type GritTargetLanguage = "CSS" | "JavaScript";
3693
+ interface ParsePatternResult {
3694
+ patternId: PatternId;
3695
+ }
3696
+ type PatternId = string;
3697
+ interface SearchPatternParams {
3698
+ path: BiomePath;
3699
+ pattern: PatternId;
3700
+ projectKey: ProjectKey;
3701
+ }
3702
+ interface SearchResults {
3703
+ matches: TextRange[];
3704
+ path: BiomePath;
3705
+ }
3706
+ interface DropPatternParams {
3707
+ pattern: PatternId;
3708
+ }
3297
3709
 
3298
3710
 
3299
3711
  export class DiagnosticPrinter {
3300
3712
  free(): void;
3301
- /**
3302
- * @param {string} file_name
3303
- * @param {string} file_source
3304
- */
3305
3713
  constructor(file_name: string, file_source: string);
3306
- /**
3307
- * @param {Diagnostic} diagnostic
3308
- */
3309
3714
  print_simple(diagnostic: Diagnostic): void;
3310
- /**
3311
- * @param {Diagnostic} diagnostic
3312
- */
3313
3715
  print_verbose(diagnostic: Diagnostic): void;
3314
- /**
3315
- * @returns {string}
3316
- */
3317
3716
  finish(): string;
3318
3717
  }
3319
3718
  export class Workspace {
3320
3719
  free(): void;
3321
3720
  constructor();
3322
- /**
3323
- * @param {SupportsFeatureParams} params
3324
- * @returns {FileFeaturesResult}
3325
- */
3326
3721
  fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3327
- /**
3328
- * @param {UpdateSettingsParams} params
3329
- */
3330
- updateSettings(params: UpdateSettingsParams): void;
3331
- /**
3332
- * @param {RegisterProjectFolderParams} params
3333
- * @returns {ProjectKey}
3334
- */
3335
- registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
3336
- /**
3337
- * @param {OpenFileParams} params
3338
- */
3722
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
3723
+ openProject(params: OpenProjectParams): ProjectKey;
3339
3724
  openFile(params: OpenFileParams): void;
3340
- /**
3341
- * @param {GetFileContentParams} params
3342
- * @returns {string}
3343
- */
3344
3725
  getFileContent(params: GetFileContentParams): string;
3345
- /**
3346
- * @param {GetSyntaxTreeParams} params
3347
- * @returns {GetSyntaxTreeResult}
3348
- */
3349
3726
  getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
3350
- /**
3351
- * @param {GetControlFlowGraphParams} params
3352
- * @returns {string}
3353
- */
3354
3727
  getControlFlowGraph(params: GetControlFlowGraphParams): string;
3355
- /**
3356
- * @param {GetFormatterIRParams} params
3357
- * @returns {string}
3358
- */
3359
3728
  getFormatterIr(params: GetFormatterIRParams): string;
3360
- /**
3361
- * @param {ChangeFileParams} params
3362
- */
3363
3729
  changeFile(params: ChangeFileParams): void;
3364
- /**
3365
- * @param {CloseFileParams} params
3366
- */
3367
3730
  closeFile(params: CloseFileParams): void;
3368
- /**
3369
- * @param {PullDiagnosticsParams} params
3370
- * @returns {PullDiagnosticsResult}
3371
- */
3372
3731
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
3373
- /**
3374
- * @param {PullActionsParams} params
3375
- * @returns {PullActionsResult}
3376
- */
3377
3732
  pullActions(params: PullActionsParams): PullActionsResult;
3378
- /**
3379
- * @param {FormatFileParams} params
3380
- * @returns {any}
3381
- */
3382
3733
  formatFile(params: FormatFileParams): any;
3383
- /**
3384
- * @param {FormatRangeParams} params
3385
- * @returns {any}
3386
- */
3387
3734
  formatRange(params: FormatRangeParams): any;
3388
- /**
3389
- * @param {FormatOnTypeParams} params
3390
- * @returns {any}
3391
- */
3392
3735
  formatOnType(params: FormatOnTypeParams): any;
3393
- /**
3394
- * @param {FixFileParams} params
3395
- * @returns {FixFileResult}
3396
- */
3397
3736
  fixFile(params: FixFileParams): FixFileResult;
3398
- /**
3399
- * @param {OrganizeImportsParams} params
3400
- * @returns {OrganizeImportsResult}
3401
- */
3402
- organizeImports(params: OrganizeImportsParams): OrganizeImportsResult;
3403
- /**
3404
- * @param {RenameParams} params
3405
- * @returns {RenameResult}
3406
- */
3407
3737
  rename(params: RenameParams): RenameResult;
3408
3738
  }
3409
3739
 
@@ -3413,37 +3743,36 @@ export interface InitOutput {
3413
3743
  readonly memory: WebAssembly.Memory;
3414
3744
  readonly __wbg_workspace_free: (a: number, b: number) => void;
3415
3745
  readonly workspace_new: () => number;
3416
- readonly workspace_fileFeatures: (a: number, b: number) => Array;
3417
- readonly workspace_updateSettings: (a: number, b: number) => Array;
3418
- readonly workspace_registerProjectFolder: (a: number, b: number) => Array;
3419
- readonly workspace_openFile: (a: number, b: number) => Array;
3420
- readonly workspace_getFileContent: (a: number, b: number) => Array;
3421
- readonly workspace_getSyntaxTree: (a: number, b: number) => Array;
3422
- readonly workspace_getControlFlowGraph: (a: number, b: number) => Array;
3423
- readonly workspace_getFormatterIr: (a: number, b: number) => Array;
3424
- readonly workspace_changeFile: (a: number, b: number) => Array;
3425
- readonly workspace_closeFile: (a: number, b: number) => Array;
3426
- readonly workspace_pullDiagnostics: (a: number, b: number) => Array;
3427
- readonly workspace_pullActions: (a: number, b: number) => Array;
3428
- readonly workspace_formatFile: (a: number, b: number) => Array;
3429
- readonly workspace_formatRange: (a: number, b: number) => Array;
3430
- readonly workspace_formatOnType: (a: number, b: number) => Array;
3431
- readonly workspace_fixFile: (a: number, b: number) => Array;
3432
- readonly workspace_organizeImports: (a: number, b: number) => Array;
3433
- readonly workspace_rename: (a: number, b: number) => Array;
3746
+ readonly workspace_fileFeatures: (a: number, b: any) => [number, number, number];
3747
+ readonly workspace_updateSettings: (a: number, b: any) => [number, number, number];
3748
+ readonly workspace_openProject: (a: number, b: any) => [number, number, number];
3749
+ readonly workspace_openFile: (a: number, b: any) => [number, number];
3750
+ readonly workspace_getFileContent: (a: number, b: any) => [number, number, number, number];
3751
+ readonly workspace_getSyntaxTree: (a: number, b: any) => [number, number, number];
3752
+ readonly workspace_getControlFlowGraph: (a: number, b: any) => [number, number, number, number];
3753
+ readonly workspace_getFormatterIr: (a: number, b: any) => [number, number, number, number];
3754
+ readonly workspace_changeFile: (a: number, b: any) => [number, number];
3755
+ readonly workspace_closeFile: (a: number, b: any) => [number, number];
3756
+ readonly workspace_pullDiagnostics: (a: number, b: any) => [number, number, number];
3757
+ readonly workspace_pullActions: (a: number, b: any) => [number, number, number];
3758
+ readonly workspace_formatFile: (a: number, b: any) => [number, number, number];
3759
+ readonly workspace_formatRange: (a: number, b: any) => [number, number, number];
3760
+ readonly workspace_formatOnType: (a: number, b: any) => [number, number, number];
3761
+ readonly workspace_fixFile: (a: number, b: any) => [number, number, number];
3762
+ readonly workspace_rename: (a: number, b: any) => [number, number, number];
3434
3763
  readonly main: () => void;
3435
3764
  readonly __wbg_diagnosticprinter_free: (a: number, b: number) => void;
3436
3765
  readonly diagnosticprinter_new: (a: number, b: number, c: number, d: number) => number;
3437
- readonly diagnosticprinter_print_simple: (a: number, b: number) => Array;
3438
- readonly diagnosticprinter_print_verbose: (a: number, b: number) => Array;
3439
- readonly diagnosticprinter_finish: (a: number) => Array;
3766
+ readonly diagnosticprinter_print_simple: (a: number, b: any) => [number, number];
3767
+ readonly diagnosticprinter_print_verbose: (a: number, b: any) => [number, number];
3768
+ readonly diagnosticprinter_finish: (a: number) => [number, number, number, number];
3440
3769
  readonly __wbindgen_malloc: (a: number, b: number) => number;
3441
3770
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
3442
- readonly __wbindgen_export_2: WebAssembly.Table;
3443
- readonly __externref_table_dealloc: (a: number) => void;
3444
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
3445
3771
  readonly __wbindgen_exn_store: (a: number) => void;
3446
3772
  readonly __externref_table_alloc: () => number;
3773
+ readonly __wbindgen_export_4: WebAssembly.Table;
3774
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
3775
+ readonly __externref_table_dealloc: (a: number) => void;
3447
3776
  readonly __wbindgen_start: () => void;
3448
3777
  }
3449
3778