@biomejs/wasm-web 1.9.5-nightly.ff02a0b → 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
  */
@@ -1024,7 +1215,7 @@ interface Correctness {
1024
1215
  /**
1025
1216
  * Prevents the usage of variables that haven't been declared inside the document.
1026
1217
  */
1027
- noUndeclaredVariables?: RuleConfiguration_for_Null;
1218
+ noUndeclaredVariables?: RuleConfiguration_for_UndeclaredVariablesOptions;
1028
1219
  /**
1029
1220
  * Disallow unknown CSS value functions.
1030
1221
  */
@@ -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,14 @@ 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;
1389
+ /**
1390
+ * Disallow the use of __dirname and __filename in the global scope.
1391
+ */
1392
+ noGlobalDirnameFilename?: RuleFixConfiguration_for_Null;
1182
1393
  /**
1183
1394
  * Prevent usage of \<head> element in a Next.js project.
1184
1395
  */
@@ -1191,6 +1402,10 @@ interface Nursery {
1191
1402
  * Prevent usage of \<img> element in a Next.js project.
1192
1403
  */
1193
1404
  noImgElement?: RuleConfiguration_for_Null;
1405
+ /**
1406
+ * Prevent import cycles.
1407
+ */
1408
+ noImportCycles?: RuleConfiguration_for_Null;
1194
1409
  /**
1195
1410
  * Disallows the use of irregular whitespace characters.
1196
1411
  */
@@ -1203,14 +1418,22 @@ interface Nursery {
1203
1418
  * Disallow nested ternary expressions.
1204
1419
  */
1205
1420
  noNestedTernary?: RuleConfiguration_for_Null;
1421
+ /**
1422
+ * Disallow use event handlers on non-interactive elements.
1423
+ */
1424
+ noNoninteractiveElementInteractions?: RuleConfiguration_for_Null;
1206
1425
  /**
1207
1426
  * Disallow octal escape sequences in string literals
1208
1427
  */
1209
- noOctalEscape?: RuleConfiguration_for_Null;
1428
+ noOctalEscape?: RuleFixConfiguration_for_Null;
1210
1429
  /**
1211
1430
  * Disallow the use of process.env.
1212
1431
  */
1213
1432
  noProcessEnv?: RuleConfiguration_for_Null;
1433
+ /**
1434
+ * Disallow the use of process global.
1435
+ */
1436
+ noProcessGlobal?: RuleFixConfiguration_for_Null;
1214
1437
  /**
1215
1438
  * Disallow specified modules when loaded by import or require.
1216
1439
  */
@@ -1235,6 +1458,14 @@ interface Nursery {
1235
1458
  * Disallow template literal placeholder syntax in regular strings.
1236
1459
  */
1237
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;
1238
1469
  /**
1239
1470
  * Disallow unknown pseudo-class selectors.
1240
1471
  */
@@ -1247,10 +1478,18 @@ interface Nursery {
1247
1478
  * Disallow unknown type selectors.
1248
1479
  */
1249
1480
  noUnknownTypeSelector?: RuleConfiguration_for_Null;
1481
+ /**
1482
+ * Prevent duplicate polyfills from Polyfill.io.
1483
+ */
1484
+ noUnwantedPolyfillio?: RuleConfiguration_for_Null;
1250
1485
  /**
1251
1486
  * Disallow unnecessary escape sequence in regular expression literals.
1252
1487
  */
1253
1488
  noUselessEscapeInRegex?: RuleFixConfiguration_for_Null;
1489
+ /**
1490
+ * Disallow unnecessary escapes in string literals.
1491
+ */
1492
+ noUselessEscapeInString?: RuleFixConfiguration_for_Null;
1254
1493
  /**
1255
1494
  * Disallow unnecessary String.raw function in template string literals without any escape sequence.
1256
1495
  */
@@ -1296,13 +1535,25 @@ interface Nursery {
1296
1535
  */
1297
1536
  useConsistentMemberAccessibility?: RuleConfiguration_for_ConsistentMemberAccessibilityOptions;
1298
1537
  /**
1299
- * Require specifying the reason argument when using @deprecated directive
1538
+ * Require the consistent declaration of object literals. Defaults to explicit definitions.
1539
+ */
1540
+ useConsistentObjectDefinition?: RuleConfiguration_for_UseConsistentObjectDefinitionOptions;
1541
+ /**
1542
+ * Require specifying the reason argument when using @deprecated directive
1300
1543
  */
1301
1544
  useDeprecatedReason?: RuleConfiguration_for_Null;
1302
1545
  /**
1303
1546
  * Require explicit return types on functions and class methods.
1304
1547
  */
1305
1548
  useExplicitType?: RuleConfiguration_for_Null;
1549
+ /**
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;
1306
1557
  /**
1307
1558
  * Enforces the use of a recommended display strategy with Google Fonts.
1308
1559
  */
@@ -1315,14 +1566,18 @@ interface Nursery {
1315
1566
  * Require for-in loops to include an if statement.
1316
1567
  */
1317
1568
  useGuardForIn?: RuleConfiguration_for_Null;
1318
- /**
1319
- * Disallows package private imports.
1320
- */
1321
- useImportRestrictions?: RuleConfiguration_for_Null;
1322
1569
  /**
1323
1570
  * Enforce specifying the name of GraphQL operations.
1324
1571
  */
1325
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;
1326
1581
  /**
1327
1582
  * Enforce the sorting of CSS utility classes.
1328
1583
  */
@@ -1331,6 +1586,10 @@ interface Nursery {
1331
1586
  * Enforce the use of the directive "use strict" in script files.
1332
1587
  */
1333
1588
  useStrictMode?: RuleFixConfiguration_for_Null;
1589
+ /**
1590
+ * Require a description parameter for the Symbol().
1591
+ */
1592
+ useSymbolDescription?: RuleConfiguration_for_Null;
1334
1593
  /**
1335
1594
  * Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
1336
1595
  */
@@ -1341,10 +1600,6 @@ interface Nursery {
1341
1600
  useValidAutocomplete?: RuleConfiguration_for_UseValidAutocompleteOptions;
1342
1601
  }
1343
1602
  interface Performance {
1344
- /**
1345
- * It enables ALL rules for this group.
1346
- */
1347
- all?: boolean;
1348
1603
  /**
1349
1604
  * Disallow the use of spread (...) syntax on accumulators.
1350
1605
  */
@@ -1371,10 +1626,6 @@ interface Performance {
1371
1626
  useTopLevelRegex?: RuleConfiguration_for_Null;
1372
1627
  }
1373
1628
  interface Security {
1374
- /**
1375
- * It enables ALL rules for this group.
1376
- */
1377
- all?: boolean;
1378
1629
  /**
1379
1630
  * Prevent the usage of dangerous JSX props
1380
1631
  */
@@ -1393,10 +1644,6 @@ interface Security {
1393
1644
  recommended?: boolean;
1394
1645
  }
1395
1646
  interface Style {
1396
- /**
1397
- * It enables ALL rules for this group.
1398
- */
1399
- all?: boolean;
1400
1647
  /**
1401
1648
  * Disallow the use of arguments.
1402
1649
  */
@@ -1461,10 +1708,6 @@ interface Style {
1461
1708
  * Disallow else block when the if block breaks early.
1462
1709
  */
1463
1710
  noUselessElse?: RuleFixConfiguration_for_Null;
1464
- /**
1465
- * Disallow the use of var
1466
- */
1467
- noVar?: RuleFixConfiguration_for_Null;
1468
1711
  /**
1469
1712
  * Disallow the use of yoda expressions.
1470
1713
  */
@@ -1597,16 +1840,8 @@ interface Style {
1597
1840
  * Disallow throwing non-Error values.
1598
1841
  */
1599
1842
  useThrowOnlyError?: RuleConfiguration_for_Null;
1600
- /**
1601
- * Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.
1602
- */
1603
- useWhile?: RuleFixConfiguration_for_Null;
1604
1843
  }
1605
1844
  interface Suspicious {
1606
- /**
1607
- * It enables ALL rules for this group.
1608
- */
1609
- all?: boolean;
1610
1845
  /**
1611
1846
  * Use standard constants instead of approximated literals.
1612
1847
  */
@@ -1642,7 +1877,7 @@ interface Suspicious {
1642
1877
  /**
1643
1878
  * Disallow labeled statements that are not loops.
1644
1879
  */
1645
- noConfusingLabels?: RuleConfiguration_for_Null;
1880
+ noConfusingLabels?: RuleConfiguration_for_NoConfusingLabelsOptions;
1646
1881
  /**
1647
1882
  * Disallow void type outside of generic or return types.
1648
1883
  */
@@ -1651,16 +1886,12 @@ interface Suspicious {
1651
1886
  * Disallow the use of console.
1652
1887
  */
1653
1888
  noConsole?: RuleFixConfiguration_for_NoConsoleOptions;
1654
- /**
1655
- * Disallow the use of console.log
1656
- */
1657
- noConsoleLog?: RuleFixConfiguration_for_Null;
1658
1889
  /**
1659
1890
  * Disallow TypeScript const enum
1660
1891
  */
1661
1892
  noConstEnum?: RuleFixConfiguration_for_Null;
1662
1893
  /**
1663
- * 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.
1664
1895
  */
1665
1896
  noControlCharactersInRegex?: RuleConfiguration_for_Null;
1666
1897
  /**
@@ -1824,7 +2055,7 @@ interface Suspicious {
1824
2055
  */
1825
2056
  noSkippedTests?: RuleFixConfiguration_for_Null;
1826
2057
  /**
1827
- * Disallow sparse arrays
2058
+ * Prevents the use of sparse arrays (arrays with holes).
1828
2059
  */
1829
2060
  noSparseArray?: RuleFixConfiguration_for_Null;
1830
2061
  /**
@@ -1843,6 +2074,10 @@ interface Suspicious {
1843
2074
  * Disallow using unsafe negation.
1844
2075
  */
1845
2076
  noUnsafeNegation?: RuleFixConfiguration_for_Null;
2077
+ /**
2078
+ * Disallow the use of var
2079
+ */
2080
+ noVar?: RuleFixConfiguration_for_Null;
1846
2081
  /**
1847
2082
  * It enables the recommended rules for this group
1848
2083
  */
@@ -1876,67 +2111,31 @@ interface Suspicious {
1876
2111
  */
1877
2112
  useNumberToFixedDigitsArgument?: RuleFixConfiguration_for_Null;
1878
2113
  /**
1879
- * This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions
2114
+ * This rule checks that the result of a typeof expression is compared to a valid value.
1880
2115
  */
1881
2116
  useValidTypeof?: RuleFixConfiguration_for_Null;
1882
2117
  }
1883
- interface OverrideFormatterConfiguration {
1884
- /**
1885
- * The attribute position style.
1886
- */
1887
- attributePosition?: AttributePosition;
1888
- /**
1889
- * Whether to insert spaces around brackets in object literals. Defaults to true.
1890
- */
1891
- bracketSpacing?: BracketSpacing;
1892
- enabled?: boolean;
1893
- /**
1894
- * Stores whether formatting should be allowed to proceed if a given file has syntax errors
1895
- */
1896
- formatWithErrors?: boolean;
1897
- /**
1898
- * The size of the indentation, 2 by default (deprecated, use `indent-width`)
1899
- */
1900
- indentSize?: IndentWidth;
1901
- /**
1902
- * The indent style.
1903
- */
1904
- indentStyle?: IndentStyle;
1905
- /**
1906
- * The size of the indentation, 2 by default
1907
- */
1908
- indentWidth?: IndentWidth;
2118
+ type RuleAssistPlainConfiguration = "off" | "on";
2119
+ interface RuleAssistWithOptions_for_Options {
1909
2120
  /**
1910
- * The type of line ending.
2121
+ * The severity of the emitted diagnostics by the rule
1911
2122
  */
1912
- lineEnding?: LineEnding;
2123
+ level: RuleAssistPlainConfiguration;
1913
2124
  /**
1914
- * What's the max width of a line. Defaults to 80.
2125
+ * Rule's options
1915
2126
  */
1916
- lineWidth?: LineWidth;
2127
+ options: Options;
1917
2128
  }
1918
- interface OverrideLinterConfiguration {
1919
- /**
1920
- * if `false`, it disables the feature and the linter won't be executed. `true` by default
1921
- */
1922
- enabled?: boolean;
2129
+ interface RuleAssistWithOptions_for_Null {
1923
2130
  /**
1924
- * List of rules
2131
+ * The severity of the emitted diagnostics by the rule
1925
2132
  */
1926
- rules?: Rules;
1927
- }
1928
- interface OverrideOrganizeImportsConfiguration {
2133
+ level: RuleAssistPlainConfiguration;
1929
2134
  /**
1930
- * if `false`, it disables the feature and the linter won't be executed. `true` by default
2135
+ * Rule's options
1931
2136
  */
1932
- enabled?: boolean;
2137
+ options: null;
1933
2138
  }
1934
- type RuleAssistConfiguration_for_Options =
1935
- | RuleAssistPlainConfiguration
1936
- | RuleAssistWithOptions_for_Options;
1937
- type RuleAssistConfiguration_for_Null =
1938
- | RuleAssistPlainConfiguration
1939
- | RuleAssistWithOptions_for_Null;
1940
2139
  type RuleFixConfiguration_for_Null =
1941
2140
  | RulePlainConfiguration
1942
2141
  | RuleWithFixOptions_for_Null;
@@ -1955,18 +2154,33 @@ type RuleFixConfiguration_for_ValidAriaRoleOptions =
1955
2154
  type RuleConfiguration_for_ComplexityOptions =
1956
2155
  | RulePlainConfiguration
1957
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;
1958
2163
  type RuleConfiguration_for_NoUndeclaredDependenciesOptions =
1959
2164
  | RulePlainConfiguration
1960
2165
  | RuleWithOptions_for_NoUndeclaredDependenciesOptions;
1961
- type RuleConfiguration_for_UseExhaustiveDependenciesOptions =
2166
+ type RuleConfiguration_for_UndeclaredVariablesOptions =
2167
+ | RulePlainConfiguration
2168
+ | RuleWithOptions_for_UndeclaredVariablesOptions;
2169
+ type RuleFixConfiguration_for_NoUnusedVariablesOptions =
2170
+ | RulePlainConfiguration
2171
+ | RuleWithFixOptions_for_NoUnusedVariablesOptions;
2172
+ type RuleFixConfiguration_for_UseExhaustiveDependenciesOptions =
1962
2173
  | RulePlainConfiguration
1963
- | RuleWithOptions_for_UseExhaustiveDependenciesOptions;
2174
+ | RuleWithFixOptions_for_UseExhaustiveDependenciesOptions;
1964
2175
  type RuleConfiguration_for_DeprecatedHooksOptions =
1965
2176
  | RulePlainConfiguration
1966
2177
  | RuleWithOptions_for_DeprecatedHooksOptions;
1967
2178
  type RuleFixConfiguration_for_UseImportExtensionsOptions =
1968
2179
  | RulePlainConfiguration
1969
2180
  | RuleWithFixOptions_for_UseImportExtensionsOptions;
2181
+ type RuleConfiguration_for_NoBitwiseOperatorsOptions =
2182
+ | RulePlainConfiguration
2183
+ | RuleWithOptions_for_NoBitwiseOperatorsOptions;
1970
2184
  type RuleConfiguration_for_RestrictedImportsOptions =
1971
2185
  | RulePlainConfiguration
1972
2186
  | RuleWithOptions_for_RestrictedImportsOptions;
@@ -1982,6 +2196,9 @@ type RuleConfiguration_for_UseComponentExportOnlyModulesOptions =
1982
2196
  type RuleConfiguration_for_ConsistentMemberAccessibilityOptions =
1983
2197
  | RulePlainConfiguration
1984
2198
  | RuleWithOptions_for_ConsistentMemberAccessibilityOptions;
2199
+ type RuleConfiguration_for_UseConsistentObjectDefinitionOptions =
2200
+ | RulePlainConfiguration
2201
+ | RuleWithOptions_for_UseConsistentObjectDefinitionOptions;
1985
2202
  type RuleFixConfiguration_for_UtilityClassSortingOptions =
1986
2203
  | RulePlainConfiguration
1987
2204
  | RuleWithFixOptions_for_UtilityClassSortingOptions;
@@ -2003,34 +2220,19 @@ type RuleFixConfiguration_for_NamingConventionOptions =
2003
2220
  type RuleFixConfiguration_for_UseSelfClosingElementsOptions =
2004
2221
  | RulePlainConfiguration
2005
2222
  | RuleWithFixOptions_for_UseSelfClosingElementsOptions;
2223
+ type RuleConfiguration_for_NoConfusingLabelsOptions =
2224
+ | RulePlainConfiguration
2225
+ | RuleWithOptions_for_NoConfusingLabelsOptions;
2006
2226
  type RuleFixConfiguration_for_NoConsoleOptions =
2007
2227
  | RulePlainConfiguration
2008
2228
  | RuleWithFixOptions_for_NoConsoleOptions;
2009
2229
  type RuleFixConfiguration_for_NoDoubleEqualsOptions =
2010
2230
  | RulePlainConfiguration
2011
2231
  | RuleWithFixOptions_for_NoDoubleEqualsOptions;
2012
- type RuleAssistPlainConfiguration = "on" | "off";
2013
- interface RuleAssistWithOptions_for_Options {
2014
- /**
2015
- * The severity of the emitted diagnostics by the rule
2016
- */
2017
- level: RuleAssistPlainConfiguration;
2018
- /**
2019
- * Rule's options
2020
- */
2021
- options: Options;
2022
- }
2023
- interface RuleAssistWithOptions_for_Null {
2024
- /**
2025
- * The severity of the emitted diagnostics by the rule
2026
- */
2027
- level: RuleAssistPlainConfiguration;
2028
- /**
2029
- * Rule's options
2030
- */
2031
- options: null;
2232
+ interface Options {
2233
+ groups?: ImportGroups;
2032
2234
  }
2033
- type RulePlainConfiguration = "warn" | "error" | "info" | "off";
2235
+ type RulePlainConfiguration = "off" | "on" | "info" | "warn" | "error";
2034
2236
  interface RuleWithFixOptions_for_Null {
2035
2237
  /**
2036
2238
  * The kind of the code actions emitted by the rule
@@ -2103,6 +2305,26 @@ interface RuleWithOptions_for_ComplexityOptions {
2103
2305
  */
2104
2306
  options: ComplexityOptions;
2105
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
+ }
2106
2328
  interface RuleWithOptions_for_NoUndeclaredDependenciesOptions {
2107
2329
  /**
2108
2330
  * The severity of the emitted diagnostics by the rule
@@ -2113,7 +2335,35 @@ interface RuleWithOptions_for_NoUndeclaredDependenciesOptions {
2113
2335
  */
2114
2336
  options: NoUndeclaredDependenciesOptions;
2115
2337
  }
2116
- interface RuleWithOptions_for_UseExhaustiveDependenciesOptions {
2338
+ interface RuleWithOptions_for_UndeclaredVariablesOptions {
2339
+ /**
2340
+ * The severity of the emitted diagnostics by the rule
2341
+ */
2342
+ level: RulePlainConfiguration;
2343
+ /**
2344
+ * Rule's options
2345
+ */
2346
+ options: UndeclaredVariablesOptions;
2347
+ }
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;
2117
2367
  /**
2118
2368
  * The severity of the emitted diagnostics by the rule
2119
2369
  */
@@ -2147,6 +2397,16 @@ interface RuleWithFixOptions_for_UseImportExtensionsOptions {
2147
2397
  */
2148
2398
  options: UseImportExtensionsOptions;
2149
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
+ }
2150
2410
  interface RuleWithOptions_for_RestrictedImportsOptions {
2151
2411
  /**
2152
2412
  * The severity of the emitted diagnostics by the rule
@@ -2201,6 +2461,16 @@ interface RuleWithOptions_for_ConsistentMemberAccessibilityOptions {
2201
2461
  */
2202
2462
  options: ConsistentMemberAccessibilityOptions;
2203
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
+ }
2204
2474
  interface RuleWithFixOptions_for_UtilityClassSortingOptions {
2205
2475
  /**
2206
2476
  * The kind of the code actions emitted by the rule
@@ -2287,6 +2557,16 @@ interface RuleWithFixOptions_for_UseSelfClosingElementsOptions {
2287
2557
  */
2288
2558
  options: UseSelfClosingElementsOptions;
2289
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
+ }
2290
2570
  interface RuleWithFixOptions_for_NoConsoleOptions {
2291
2571
  /**
2292
2572
  * The kind of the code actions emitted by the rule
@@ -2315,10 +2595,7 @@ interface RuleWithFixOptions_for_NoDoubleEqualsOptions {
2315
2595
  */
2316
2596
  options: NoDoubleEqualsOptions;
2317
2597
  }
2318
- interface Options {
2319
- importGroups?: ImportGroup[];
2320
- legacy?: boolean;
2321
- }
2598
+ type ImportGroups = ImportGroup[];
2322
2599
  type FixKind = "none" | "safe" | "unsafe";
2323
2600
  interface AllowDomainOptions {
2324
2601
  /**
@@ -2350,6 +2627,20 @@ interface ComplexityOptions {
2350
2627
  */
2351
2628
  maxAllowedComplexity?: number;
2352
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
+ }
2353
2644
  interface NoUndeclaredDependenciesOptions {
2354
2645
  /**
2355
2646
  * If set to `false`, then the rule will show an error when `devDependencies` are imported. Defaults to `true`.
@@ -2364,6 +2655,18 @@ interface NoUndeclaredDependenciesOptions {
2364
2655
  */
2365
2656
  peerDependencies?: DependencyAvailability;
2366
2657
  }
2658
+ interface UndeclaredVariablesOptions {
2659
+ /**
2660
+ * Check undeclared types.
2661
+ */
2662
+ checkTypes?: boolean;
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
+ }
2367
2670
  interface UseExhaustiveDependenciesOptions {
2368
2671
  /**
2369
2672
  * List of hooks of which the dependencies should be validated.
@@ -2381,18 +2684,24 @@ interface UseExhaustiveDependenciesOptions {
2381
2684
  interface DeprecatedHooksOptions {}
2382
2685
  interface UseImportExtensionsOptions {
2383
2686
  /**
2384
- * 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.
2385
2694
  */
2386
- suggestedExtensions?: {};
2695
+ allow: string[];
2387
2696
  }
2388
2697
  interface RestrictedImportsOptions {
2389
2698
  /**
2390
- * A list of names that should trigger the rule
2699
+ * A list of import paths that should trigger the rule.
2391
2700
  */
2392
- paths: {};
2701
+ paths: Record<string, CustomRestrictedImport>;
2393
2702
  }
2394
2703
  interface NoRestrictedTypesOptions {
2395
- types?: {};
2704
+ types?: Record<string, CustomRestrictedType>;
2396
2705
  }
2397
2706
  interface NoSecretsOptions {
2398
2707
  /**
@@ -2413,6 +2722,12 @@ interface UseComponentExportOnlyModulesOptions {
2413
2722
  interface ConsistentMemberAccessibilityOptions {
2414
2723
  accessibility?: Accessibility;
2415
2724
  }
2725
+ interface UseConsistentObjectDefinitionOptions {
2726
+ /**
2727
+ * The preferred syntax to enforce.
2728
+ */
2729
+ syntax?: ObjectPropertySyntax;
2730
+ }
2416
2731
  interface UtilityClassSortingOptions {
2417
2732
  /**
2418
2733
  * Additional attributes that will be sorted.
@@ -2461,10 +2776,6 @@ interface NamingConventionOptions {
2461
2776
  * Custom conventions.
2462
2777
  */
2463
2778
  conventions: Convention[];
2464
- /**
2465
- * Allowed cases for _TypeScript_ `enum` member names.
2466
- */
2467
- enumMemberCase: Format;
2468
2779
  /**
2469
2780
  * If `false`, then non-ASCII characters are allowed.
2470
2781
  */
@@ -2477,6 +2788,12 @@ interface NamingConventionOptions {
2477
2788
  interface UseSelfClosingElementsOptions {
2478
2789
  ignoreHtmlElements?: boolean;
2479
2790
  }
2791
+ interface NoConfusingLabelsOptions {
2792
+ /**
2793
+ * A list of (non-confusing) labels that should be allowed
2794
+ */
2795
+ allowedLabels: string[];
2796
+ }
2480
2797
  interface NoConsoleOptions {
2481
2798
  /**
2482
2799
  * Allowed calls on the console object.
@@ -2491,7 +2808,11 @@ If `false`, no such exception will be made.
2491
2808
  */
2492
2809
  ignoreNull: boolean;
2493
2810
  }
2494
- type ImportGroup = PredefinedImportGroup | Regex;
2811
+ type ImportGroup =
2812
+ | PredefinedImportGroup
2813
+ | ImportSourceGlob
2814
+ | ImportSourceGlob[];
2815
+ type Visibility = "public" | "package" | "private";
2495
2816
  type DependencyAvailability = boolean | string[];
2496
2817
  interface Hook {
2497
2818
  /**
@@ -2519,7 +2840,10 @@ For example, for React's `useRef()` hook the value would be `true`, while for `u
2519
2840
  */
2520
2841
  stableResult?: StableHookResult;
2521
2842
  }
2843
+ type CustomRestrictedImport = string | CustomRestrictedImportOptions;
2844
+ type CustomRestrictedType = string | CustomRestrictedTypeOptions;
2522
2845
  type Accessibility = "noPublic" | "explicit" | "none";
2846
+ type ObjectPropertySyntax = "explicit" | "shorthand";
2523
2847
  type ConsistentArrayType = "shorthand" | "generic";
2524
2848
  type FilenameCases = FilenameCase[];
2525
2849
  type Regex = string;
@@ -2537,9 +2861,35 @@ interface Convention {
2537
2861
  */
2538
2862
  selector: Selector;
2539
2863
  }
2540
- type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2541
- 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;
2542
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
+ }
2543
2893
  type FilenameCase =
2544
2894
  | "camelCase"
2545
2895
  | "export"
@@ -2561,6 +2911,7 @@ interface Selector {
2561
2911
  */
2562
2912
  scope: Scope;
2563
2913
  }
2914
+ type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2564
2915
  type Kind =
2565
2916
  | "class"
2566
2917
  | "enum"
@@ -2608,111 +2959,8 @@ type RestrictedModifier =
2608
2959
  | "protected"
2609
2960
  | "readonly"
2610
2961
  | "static";
2611
- interface RegisterProjectFolderParams {
2612
- path?: string;
2613
- setAsCurrentWorkspace: boolean;
2614
- }
2615
- type ProjectKey = string;
2616
- interface SetManifestForProjectParams {
2617
- content: string;
2618
- manifest_path: BiomePath;
2619
- version: number;
2620
- }
2621
- interface OpenFileParams {
2622
- content: string;
2623
- document_file_source?: DocumentFileSource;
2624
- path: BiomePath;
2625
- version: number;
2626
- }
2627
- type DocumentFileSource =
2628
- | "Unknown"
2629
- | { Js: JsFileSource }
2630
- | { Json: JsonFileSource }
2631
- | { Css: CssFileSource }
2632
- | { Graphql: GraphqlFileSource }
2633
- | { Html: HtmlFileSource }
2634
- | { Grit: GritFileSource };
2635
- interface JsFileSource {
2636
- /**
2637
- * Used to mark if the source is being used for an Astro, Svelte or Vue file
2638
- */
2639
- embedding_kind: EmbeddingKind;
2640
- language: Language;
2641
- module_kind: ModuleKind;
2642
- variant: LanguageVariant;
2643
- version: LanguageVersion;
2644
- }
2645
- interface JsonFileSource {
2646
- allow_comments: boolean;
2647
- allow_trailing_commas: boolean;
2648
- }
2649
- interface CssFileSource {
2650
- variant: CssVariant;
2651
- }
2652
- interface GraphqlFileSource {
2653
- variant: GraphqlVariant;
2654
- }
2655
- interface HtmlFileSource {
2656
- variant: HtmlVariant;
2657
- }
2658
- interface GritFileSource {
2659
- variant: GritVariant;
2660
- }
2661
- type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
2662
- type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
2663
- type ModuleKind = "Script" | "Module";
2664
- type LanguageVariant = "Standard" | "StandardRestricted" | "Jsx";
2665
- type LanguageVersion = "ES2022" | "ESNext";
2666
- type CssVariant = "Standard";
2667
- type GraphqlVariant = "Standard";
2668
- type HtmlVariant = "Standard" | "Astro";
2669
- type GritVariant = "Standard";
2670
- interface ChangeFileParams {
2671
- content: string;
2672
- path: BiomePath;
2673
- version: number;
2674
- }
2675
- interface CloseFileParams {
2676
- path: BiomePath;
2677
- }
2678
- interface GetSyntaxTreeParams {
2679
- path: BiomePath;
2680
- }
2681
- interface GetSyntaxTreeResult {
2682
- ast: string;
2683
- cst: string;
2684
- }
2685
- interface OrganizeImportsParams {
2686
- path: BiomePath;
2687
- }
2688
- interface OrganizeImportsResult {
2689
- code: string;
2690
- }
2691
- interface GetFileContentParams {
2692
- path: BiomePath;
2693
- }
2694
- interface GetControlFlowGraphParams {
2695
- cursor: TextSize;
2696
- path: BiomePath;
2697
- }
2698
- type TextSize = number;
2699
- interface GetFormatterIRParams {
2700
- path: BiomePath;
2701
- }
2702
- interface PullDiagnosticsParams {
2703
- categories: RuleCategories;
2704
- max_diagnostics: number;
2705
- only: RuleCode[];
2706
- path: BiomePath;
2707
- skip: RuleCode[];
2708
- }
2709
- type RuleCategories = RuleCategory[];
2710
- type RuleCode = string;
2711
- type RuleCategory = "Syntax" | "Lint" | "Action" | "Transformation";
2712
- interface PullDiagnosticsResult {
2962
+ interface UpdateSettingsResult {
2713
2963
  diagnostics: Diagnostic[];
2714
- errors: number;
2715
- skipped_diagnostics: number;
2716
2964
  }
2717
2965
  interface Diagnostic {
2718
2966
  advices: Advices;
@@ -2769,7 +3017,7 @@ type Category =
2769
3017
  | "lint/complexity/noExcessiveNestedTestSuites"
2770
3018
  | "lint/complexity/noExtraBooleanCast"
2771
3019
  | "lint/complexity/noForEach"
2772
- | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
3020
+ | "lint/complexity/noAdjacentSpacesInRegex"
2773
3021
  | "lint/complexity/noStaticOnlyClass"
2774
3022
  | "lint/complexity/noThisInStatic"
2775
3023
  | "lint/complexity/noUselessCatch"
@@ -2795,6 +3043,7 @@ type Category =
2795
3043
  | "lint/complexity/useRegexLiterals"
2796
3044
  | "lint/complexity/useSimpleNumberKeys"
2797
3045
  | "lint/complexity/useSimplifiedLogicExpression"
3046
+ | "lint/complexity/useWhile"
2798
3047
  | "lint/correctness/noChildrenProp"
2799
3048
  | "lint/correctness/noConstAssign"
2800
3049
  | "lint/correctness/noConstantCondition"
@@ -2816,6 +3065,7 @@ type Category =
2816
3065
  | "lint/correctness/noNodejsModules"
2817
3066
  | "lint/correctness/noNonoctalDecimalEscape"
2818
3067
  | "lint/correctness/noPrecisionLoss"
3068
+ | "lint/correctness/noPrivateImports"
2819
3069
  | "lint/correctness/noRenderReturnValue"
2820
3070
  | "lint/correctness/noSelfAssign"
2821
3071
  | "lint/correctness/noSetterReturn"
@@ -2828,7 +3078,7 @@ type Category =
2828
3078
  | "lint/correctness/noUnknownProperty"
2829
3079
  | "lint/correctness/noUnknownUnit"
2830
3080
  | "lint/correctness/noUnmatchableAnbSelector"
2831
- | "lint/correctness/noUnnecessaryContinue"
3081
+ | "lint/correctness/noUselessContinue"
2832
3082
  | "lint/correctness/noUnreachable"
2833
3083
  | "lint/correctness/noUnreachableSuper"
2834
3084
  | "lint/correctness/noUnsafeFinally"
@@ -2849,10 +3099,14 @@ type Category =
2849
3099
  | "lint/correctness/useValidForDirection"
2850
3100
  | "lint/correctness/useYield"
2851
3101
  | "lint/nursery/colorNoInvalidHex"
3102
+ | "lint/nursery/noAwaitInLoop"
3103
+ | "lint/nursery/noBitwiseOperators"
2852
3104
  | "lint/nursery/noColorInvalidHex"
2853
3105
  | "lint/nursery/noCommonJs"
2854
3106
  | "lint/nursery/noConsole"
3107
+ | "lint/nursery/noConstantBinaryExpression"
2855
3108
  | "lint/nursery/noDescendingSpecificity"
3109
+ | "lint/nursery/noDestructuredProps"
2856
3110
  | "lint/nursery/noDocumentCookie"
2857
3111
  | "lint/nursery/noDocumentImportInPage"
2858
3112
  | "lint/nursery/noDoneCallback"
@@ -2860,13 +3114,16 @@ type Category =
2860
3114
  | "lint/nursery/noDuplicateCustomProperties"
2861
3115
  | "lint/nursery/noDuplicateElseIf"
2862
3116
  | "lint/nursery/noDuplicateProperties"
2863
- | "lint/nursery/noDuplicatedFields"
3117
+ | "lint/nursery/noDuplicateFields"
2864
3118
  | "lint/nursery/noDynamicNamespaceImportAccess"
2865
3119
  | "lint/nursery/noEnum"
2866
3120
  | "lint/nursery/noExportedImports"
3121
+ | "lint/nursery/noFloatingPromises"
3122
+ | "lint/nursery/noGlobalDirnameFilename"
2867
3123
  | "lint/nursery/noHeadElement"
2868
3124
  | "lint/nursery/noHeadImportInDocument"
2869
3125
  | "lint/nursery/noImgElement"
3126
+ | "lint/nursery/noImportCycles"
2870
3127
  | "lint/nursery/noImportantInKeyframe"
2871
3128
  | "lint/nursery/noInvalidDirectionInLinearGradient"
2872
3129
  | "lint/nursery/noInvalidGridAreas"
@@ -2875,8 +3132,10 @@ type Category =
2875
3132
  | "lint/nursery/noMissingGenericFamilyKeyword"
2876
3133
  | "lint/nursery/noMissingVarFunction"
2877
3134
  | "lint/nursery/noNestedTernary"
3135
+ | "lint/nursery/noNoninteractiveElementInteractions"
2878
3136
  | "lint/nursery/noOctalEscape"
2879
3137
  | "lint/nursery/noProcessEnv"
3138
+ | "lint/nursery/noProcessGlobal"
2880
3139
  | "lint/nursery/noReactSpecificProps"
2881
3140
  | "lint/nursery/noRestrictedImports"
2882
3141
  | "lint/nursery/noRestrictedTypes"
@@ -2885,7 +3144,9 @@ type Category =
2885
3144
  | "lint/nursery/noStaticElementInteractions"
2886
3145
  | "lint/nursery/noSubstr"
2887
3146
  | "lint/nursery/noTemplateCurlyInString"
3147
+ | "lint/nursery/noTsIgnore"
2888
3148
  | "lint/nursery/noUndeclaredDependencies"
3149
+ | "lint/nursery/noUnknownAtRule"
2889
3150
  | "lint/nursery/noUnknownFunction"
2890
3151
  | "lint/nursery/noUnknownMediaFeatureName"
2891
3152
  | "lint/nursery/noUnknownProperty"
@@ -2897,7 +3158,9 @@ type Category =
2897
3158
  | "lint/nursery/noUnknownUnit"
2898
3159
  | "lint/nursery/noUnmatchableAnbSelector"
2899
3160
  | "lint/nursery/noUnusedFunctionParameters"
3161
+ | "lint/nursery/noUnwantedPolyfillio"
2900
3162
  | "lint/nursery/noUselessEscapeInRegex"
3163
+ | "lint/nursery/noUselessEscapeInString"
2901
3164
  | "lint/nursery/noUselessStringRaw"
2902
3165
  | "lint/nursery/noUselessUndefined"
2903
3166
  | "lint/nursery/noValueAtRule"
@@ -2909,17 +3172,24 @@ type Category =
2909
3172
  | "lint/nursery/useComponentExportOnlyModules"
2910
3173
  | "lint/nursery/useConsistentCurlyBraces"
2911
3174
  | "lint/nursery/useConsistentMemberAccessibility"
3175
+ | "lint/nursery/useConsistentObjectDefinition"
2912
3176
  | "lint/nursery/useDeprecatedReason"
2913
3177
  | "lint/nursery/useExplicitFunctionReturnType"
2914
3178
  | "lint/nursery/useExplicitType"
3179
+ | "lint/nursery/useExportsLast"
3180
+ | "lint/nursery/useForComponent"
2915
3181
  | "lint/nursery/useGoogleFontDisplay"
2916
3182
  | "lint/nursery/useGoogleFontPreconnect"
2917
3183
  | "lint/nursery/useGuardForIn"
2918
3184
  | "lint/nursery/useImportRestrictions"
2919
3185
  | "lint/nursery/useJsxCurlyBraceConvention"
2920
3186
  | "lint/nursery/useNamedOperation"
3187
+ | "lint/nursery/useNamingConvention"
3188
+ | "lint/nursery/useParseIntRadix"
2921
3189
  | "lint/nursery/useSortedClasses"
3190
+ | "lint/nursery/useSortedProperties"
2922
3191
  | "lint/nursery/useStrictMode"
3192
+ | "lint/nursery/useSymbolDescription"
2923
3193
  | "lint/nursery/useTrimStartEnd"
2924
3194
  | "lint/nursery/useValidAutocomplete"
2925
3195
  | "lint/performance/noAccumulatingSpread"
@@ -2946,7 +3216,6 @@ type Category =
2946
3216
  | "lint/style/noShoutyConstants"
2947
3217
  | "lint/style/noUnusedTemplateLiteral"
2948
3218
  | "lint/style/noUselessElse"
2949
- | "lint/style/noVar"
2950
3219
  | "lint/style/noYodaExpression"
2951
3220
  | "lint/style/useAsConstAssertion"
2952
3221
  | "lint/style/useBlockStatements"
@@ -2979,7 +3248,6 @@ type Category =
2979
3248
  | "lint/style/useTemplate"
2980
3249
  | "lint/style/useThrowNewError"
2981
3250
  | "lint/style/useThrowOnlyError"
2982
- | "lint/style/useWhile"
2983
3251
  | "lint/suspicious/noApproximativeNumericConstant"
2984
3252
  | "lint/suspicious/noArrayIndexKey"
2985
3253
  | "lint/suspicious/noAssignInExpressions"
@@ -2991,7 +3259,6 @@ type Category =
2991
3259
  | "lint/suspicious/noConfusingLabels"
2992
3260
  | "lint/suspicious/noConfusingVoidType"
2993
3261
  | "lint/suspicious/noConsole"
2994
- | "lint/suspicious/noConsoleLog"
2995
3262
  | "lint/suspicious/noConstEnum"
2996
3263
  | "lint/suspicious/noControlCharactersInRegex"
2997
3264
  | "lint/suspicious/noDebugger"
@@ -3039,6 +3306,7 @@ type Category =
3039
3306
  | "lint/suspicious/noThenProperty"
3040
3307
  | "lint/suspicious/noUnsafeDeclarationMerging"
3041
3308
  | "lint/suspicious/noUnsafeNegation"
3309
+ | "lint/suspicious/noVar"
3042
3310
  | "lint/suspicious/useAwait"
3043
3311
  | "lint/suspicious/useDefaultSwitchClauseLast"
3044
3312
  | "lint/suspicious/useErrorMessage"
@@ -3047,7 +3315,7 @@ type Category =
3047
3315
  | "lint/suspicious/useNamespaceKeyword"
3048
3316
  | "lint/suspicious/useNumberToFixedDigitsArgument"
3049
3317
  | "lint/suspicious/useValidTypeof"
3050
- | "assists/source/useSortedKeys"
3318
+ | "assist/source/useSortedKeys"
3051
3319
  | "syntax/correctness/noTypeOnlyImportAttributes"
3052
3320
  | "syntax/correctness/noSuperWithoutExtends"
3053
3321
  | "syntax/correctness/noInitializerWithDefinite"
@@ -3058,10 +3326,10 @@ type Category =
3058
3326
  | "ci"
3059
3327
  | "stdin"
3060
3328
  | "configuration"
3061
- | "organizeImports"
3062
- | "assists"
3329
+ | "assist"
3063
3330
  | "migrate"
3064
3331
  | "deserialize"
3332
+ | "plugin"
3065
3333
  | "project"
3066
3334
  | "search"
3067
3335
  | "internalError/io"
@@ -3069,8 +3337,8 @@ type Category =
3069
3337
  | "internalError/panic"
3070
3338
  | "reporter/parse"
3071
3339
  | "reporter/format"
3072
- | "reporter/analyzer"
3073
- | "reporter/organizeImports"
3340
+ | "reporter/assist"
3341
+ | "reporter/linter"
3074
3342
  | "parse"
3075
3343
  | "lint"
3076
3344
  | "lint/a11y"
@@ -3081,11 +3349,12 @@ type Category =
3081
3349
  | "lint/security"
3082
3350
  | "lint/style"
3083
3351
  | "lint/suspicious"
3352
+ | "lint/plugin"
3084
3353
  | "suppressions/parse"
3085
3354
  | "suppressions/unknownGroup"
3086
3355
  | "suppressions/unknownRule"
3087
3356
  | "suppressions/unused"
3088
- | "suppressions/deprecatedSuppressionComment"
3357
+ | "suppressions/incorrect"
3089
3358
  | "args/fileNotFound"
3090
3359
  | "flags/invalid"
3091
3360
  | "semanticTests";
@@ -3123,6 +3392,7 @@ interface TextEdit {
3123
3392
  ops: CompressedOp[];
3124
3393
  }
3125
3394
  type Backtrace = BacktraceFrame[];
3395
+ type TextSize = number;
3126
3396
  type MarkupElement =
3127
3397
  | "Emphasis"
3128
3398
  | "Dim"
@@ -3151,26 +3421,158 @@ interface BacktraceSymbol {
3151
3421
  lineno?: number;
3152
3422
  name?: string;
3153
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
+ }
3154
3554
  interface PullActionsParams {
3155
- only: RuleCode[];
3555
+ enabledRules?: RuleCode[];
3556
+ only?: RuleCode[];
3156
3557
  path: BiomePath;
3558
+ projectKey: ProjectKey;
3157
3559
  range?: TextRange;
3158
- skip: RuleCode[];
3159
- suppression_reason?: string;
3560
+ skip?: RuleCode[];
3561
+ suppressionReason?: string;
3160
3562
  }
3161
3563
  interface PullActionsResult {
3162
3564
  actions: CodeAction[];
3163
3565
  }
3164
3566
  interface CodeAction {
3165
3567
  category: ActionCategory;
3166
- rule_name?: [string, string];
3568
+ ruleName?: [string, string];
3167
3569
  suggestion: CodeSuggestion;
3168
3570
  }
3169
3571
  type ActionCategory =
3170
- | "QuickFix"
3171
- | { Refactor: RefactorKind }
3172
- | { Source: SourceActionKind }
3173
- | { Other: string };
3572
+ | { quickFix: string }
3573
+ | { refactor: RefactorKind }
3574
+ | { source: SourceActionKind }
3575
+ | { other: OtherActionCategory };
3174
3576
  interface CodeSuggestion {
3175
3577
  applicability: Applicability;
3176
3578
  labels: TextRange[];
@@ -3179,25 +3581,30 @@ interface CodeSuggestion {
3179
3581
  suggestion: TextEdit;
3180
3582
  }
3181
3583
  type RefactorKind =
3182
- | "None"
3183
- | "Extract"
3184
- | "Inline"
3185
- | "Rewrite"
3186
- | { Other: string };
3584
+ | "none"
3585
+ | "extract"
3586
+ | "inline"
3587
+ | "rewrite"
3588
+ | { other: string };
3187
3589
  type SourceActionKind =
3188
- | "FixAll"
3189
- | "None"
3190
- | "OrganizeImports"
3191
- | { Other: string };
3192
- 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";
3193
3599
  interface FormatFileParams {
3194
3600
  path: BiomePath;
3601
+ projectKey: ProjectKey;
3195
3602
  }
3196
3603
  interface Printed {
3197
3604
  code: string;
3198
3605
  range?: TextRange;
3199
3606
  sourcemap: SourceMarker[];
3200
- verbatim_ranges: TextRange[];
3607
+ verbatimRanges: TextRange[];
3201
3608
  }
3202
3609
  interface SourceMarker {
3203
3610
  /**
@@ -3211,22 +3618,29 @@ interface SourceMarker {
3211
3618
  }
3212
3619
  interface FormatRangeParams {
3213
3620
  path: BiomePath;
3621
+ projectKey: ProjectKey;
3214
3622
  range: TextRange;
3215
3623
  }
3216
3624
  interface FormatOnTypeParams {
3217
3625
  offset: TextSize;
3218
3626
  path: BiomePath;
3627
+ projectKey: ProjectKey;
3219
3628
  }
3220
3629
  interface FixFileParams {
3221
- fix_file_mode: FixFileMode;
3222
- only: RuleCode[];
3630
+ /**
3631
+ * Rules to apply to the file
3632
+ */
3633
+ enabledRules?: RuleCode[];
3634
+ fixFileMode: FixFileMode;
3635
+ only?: RuleCode[];
3223
3636
  path: BiomePath;
3224
- rule_categories: RuleCategories;
3225
- should_format: boolean;
3226
- skip: RuleCode[];
3227
- suppression_reason?: string;
3637
+ projectKey: ProjectKey;
3638
+ ruleCategories: RuleCategories;
3639
+ shouldFormat: boolean;
3640
+ skip?: RuleCode[];
3641
+ suppressionReason?: string;
3228
3642
  }
3229
- type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes" | "ApplySuppressions";
3643
+ type FixFileMode = "safeFixes" | "safeAndUnsafeFixes" | "applySuppressions";
3230
3644
  interface FixFileResult {
3231
3645
  /**
3232
3646
  * List of all the code actions applied to the file
@@ -3243,7 +3657,7 @@ interface FixFileResult {
3243
3657
  /**
3244
3658
  * number of skipped suggested fixes
3245
3659
  */
3246
- skipped_suggested_fixes: number;
3660
+ skippedSuggestedFixes: number;
3247
3661
  }
3248
3662
  interface FixAction {
3249
3663
  /**
@@ -3256,9 +3670,10 @@ interface FixAction {
3256
3670
  rule_name?: [string, string];
3257
3671
  }
3258
3672
  interface RenameParams {
3259
- new_name: string;
3673
+ newName: string;
3260
3674
  path: BiomePath;
3261
- symbol_at: TextSize;
3675
+ projectKey: ProjectKey;
3676
+ symbolAt: TextSize;
3262
3677
  }
3263
3678
  interface RenameResult {
3264
3679
  /**
@@ -3270,116 +3685,55 @@ interface RenameResult {
3270
3685
  */
3271
3686
  range: TextRange;
3272
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
+ }
3273
3709
 
3274
3710
 
3275
3711
  export class DiagnosticPrinter {
3276
3712
  free(): void;
3277
- /**
3278
- * @param {string} file_name
3279
- * @param {string} file_source
3280
- */
3281
3713
  constructor(file_name: string, file_source: string);
3282
- /**
3283
- * @param {Diagnostic} diagnostic
3284
- */
3285
3714
  print_simple(diagnostic: Diagnostic): void;
3286
- /**
3287
- * @param {Diagnostic} diagnostic
3288
- */
3289
3715
  print_verbose(diagnostic: Diagnostic): void;
3290
- /**
3291
- * @returns {string}
3292
- */
3293
3716
  finish(): string;
3294
3717
  }
3295
3718
  export class Workspace {
3296
3719
  free(): void;
3297
3720
  constructor();
3298
- /**
3299
- * @param {SupportsFeatureParams} params
3300
- * @returns {FileFeaturesResult}
3301
- */
3302
3721
  fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3303
- /**
3304
- * @param {UpdateSettingsParams} params
3305
- */
3306
- updateSettings(params: UpdateSettingsParams): void;
3307
- /**
3308
- * @param {RegisterProjectFolderParams} params
3309
- * @returns {ProjectKey}
3310
- */
3311
- registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
3312
- /**
3313
- * @param {OpenFileParams} params
3314
- */
3722
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
3723
+ openProject(params: OpenProjectParams): ProjectKey;
3315
3724
  openFile(params: OpenFileParams): void;
3316
- /**
3317
- * @param {GetFileContentParams} params
3318
- * @returns {string}
3319
- */
3320
3725
  getFileContent(params: GetFileContentParams): string;
3321
- /**
3322
- * @param {GetSyntaxTreeParams} params
3323
- * @returns {GetSyntaxTreeResult}
3324
- */
3325
3726
  getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
3326
- /**
3327
- * @param {GetControlFlowGraphParams} params
3328
- * @returns {string}
3329
- */
3330
3727
  getControlFlowGraph(params: GetControlFlowGraphParams): string;
3331
- /**
3332
- * @param {GetFormatterIRParams} params
3333
- * @returns {string}
3334
- */
3335
3728
  getFormatterIr(params: GetFormatterIRParams): string;
3336
- /**
3337
- * @param {ChangeFileParams} params
3338
- */
3339
3729
  changeFile(params: ChangeFileParams): void;
3340
- /**
3341
- * @param {CloseFileParams} params
3342
- */
3343
3730
  closeFile(params: CloseFileParams): void;
3344
- /**
3345
- * @param {PullDiagnosticsParams} params
3346
- * @returns {PullDiagnosticsResult}
3347
- */
3348
3731
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
3349
- /**
3350
- * @param {PullActionsParams} params
3351
- * @returns {PullActionsResult}
3352
- */
3353
3732
  pullActions(params: PullActionsParams): PullActionsResult;
3354
- /**
3355
- * @param {FormatFileParams} params
3356
- * @returns {any}
3357
- */
3358
3733
  formatFile(params: FormatFileParams): any;
3359
- /**
3360
- * @param {FormatRangeParams} params
3361
- * @returns {any}
3362
- */
3363
3734
  formatRange(params: FormatRangeParams): any;
3364
- /**
3365
- * @param {FormatOnTypeParams} params
3366
- * @returns {any}
3367
- */
3368
3735
  formatOnType(params: FormatOnTypeParams): any;
3369
- /**
3370
- * @param {FixFileParams} params
3371
- * @returns {FixFileResult}
3372
- */
3373
3736
  fixFile(params: FixFileParams): FixFileResult;
3374
- /**
3375
- * @param {OrganizeImportsParams} params
3376
- * @returns {OrganizeImportsResult}
3377
- */
3378
- organizeImports(params: OrganizeImportsParams): OrganizeImportsResult;
3379
- /**
3380
- * @param {RenameParams} params
3381
- * @returns {RenameResult}
3382
- */
3383
3737
  rename(params: RenameParams): RenameResult;
3384
3738
  }
3385
3739
 
@@ -3389,37 +3743,36 @@ export interface InitOutput {
3389
3743
  readonly memory: WebAssembly.Memory;
3390
3744
  readonly __wbg_workspace_free: (a: number, b: number) => void;
3391
3745
  readonly workspace_new: () => number;
3392
- readonly workspace_fileFeatures: (a: number, b: number) => Array;
3393
- readonly workspace_updateSettings: (a: number, b: number) => Array;
3394
- readonly workspace_registerProjectFolder: (a: number, b: number) => Array;
3395
- readonly workspace_openFile: (a: number, b: number) => Array;
3396
- readonly workspace_getFileContent: (a: number, b: number) => Array;
3397
- readonly workspace_getSyntaxTree: (a: number, b: number) => Array;
3398
- readonly workspace_getControlFlowGraph: (a: number, b: number) => Array;
3399
- readonly workspace_getFormatterIr: (a: number, b: number) => Array;
3400
- readonly workspace_changeFile: (a: number, b: number) => Array;
3401
- readonly workspace_closeFile: (a: number, b: number) => Array;
3402
- readonly workspace_pullDiagnostics: (a: number, b: number) => Array;
3403
- readonly workspace_pullActions: (a: number, b: number) => Array;
3404
- readonly workspace_formatFile: (a: number, b: number) => Array;
3405
- readonly workspace_formatRange: (a: number, b: number) => Array;
3406
- readonly workspace_formatOnType: (a: number, b: number) => Array;
3407
- readonly workspace_fixFile: (a: number, b: number) => Array;
3408
- readonly workspace_organizeImports: (a: number, b: number) => Array;
3409
- 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];
3410
3763
  readonly main: () => void;
3411
3764
  readonly __wbg_diagnosticprinter_free: (a: number, b: number) => void;
3412
3765
  readonly diagnosticprinter_new: (a: number, b: number, c: number, d: number) => number;
3413
- readonly diagnosticprinter_print_simple: (a: number, b: number) => Array;
3414
- readonly diagnosticprinter_print_verbose: (a: number, b: number) => Array;
3415
- 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];
3416
3769
  readonly __wbindgen_malloc: (a: number, b: number) => number;
3417
3770
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
3418
- readonly __wbindgen_export_2: WebAssembly.Table;
3419
- readonly __externref_table_dealloc: (a: number) => void;
3420
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
3421
3771
  readonly __wbindgen_exn_store: (a: number) => void;
3422
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;
3423
3776
  readonly __wbindgen_start: () => void;
3424
3777
  }
3425
3778