@biomejs/wasm-nodejs 1.9.4 → 1.9.5-nightly.4713c52

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
@@ -1,7 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- */
5
3
  export function main(): void;
6
4
  interface SupportsFeatureParams {
7
5
  features: FeatureName;
@@ -486,6 +484,10 @@ interface PartialJavascriptLinter {
486
484
  }
487
485
  interface PartialJavascriptOrganizeImports {}
488
486
  interface PartialJavascriptParser {
487
+ /**
488
+ * Enables parsing of Grit metavariables. Defaults to `false`.
489
+ */
490
+ gritMetavariables?: boolean;
489
491
  /**
490
492
  * It enables the experimental and unsafe parsing of parameter decorators
491
493
 
@@ -604,13 +606,17 @@ interface OverridePattern {
604
606
  type VcsClientKind = "git";
605
607
  interface Source {
606
608
  /**
607
- * Enforce props sorting in JSX elements.
609
+ * Provides a whole-source code action to sort the imports in the file using import groups and natural ordering.
610
+ */
611
+ organizeImports?: RuleAssistConfiguration_for_Options;
612
+ /**
613
+ * Enforce attribute sorting in JSX elements.
608
614
  */
609
- sortJsxProps?: RuleAssistConfiguration;
615
+ useSortedAttributes?: RuleAssistConfiguration_for_Null;
610
616
  /**
611
617
  * Sorts the keys of a JSON object in natural order
612
618
  */
613
- useSortedKeys?: RuleAssistConfiguration;
619
+ useSortedKeys?: RuleAssistConfiguration_for_Null;
614
620
  }
615
621
  type QuoteStyle = "double" | "single";
616
622
  type ArrowParentheses = "always" | "asNeeded";
@@ -1249,6 +1255,10 @@ interface Nursery {
1249
1255
  * Disallow unnecessary String.raw function in template string literals without any escape sequence.
1250
1256
  */
1251
1257
  noUselessStringRaw?: RuleConfiguration_for_Null;
1258
+ /**
1259
+ * Disallow the use of useless undefined.
1260
+ */
1261
+ noUselessUndefined?: RuleFixConfiguration_for_Null;
1252
1262
  /**
1253
1263
  * Disallow use of @value rule in css modules.
1254
1264
  */
@@ -1297,6 +1307,10 @@ interface Nursery {
1297
1307
  * Enforces the use of a recommended display strategy with Google Fonts.
1298
1308
  */
1299
1309
  useGoogleFontDisplay?: RuleConfiguration_for_Null;
1310
+ /**
1311
+ * Ensure the preconnect attribute is used when using Google Fonts.
1312
+ */
1313
+ useGoogleFontPreconnect?: RuleFixConfiguration_for_Null;
1300
1314
  /**
1301
1315
  * Require for-in loops to include an if statement.
1302
1316
  */
@@ -1305,6 +1319,10 @@ interface Nursery {
1305
1319
  * Disallows package private imports.
1306
1320
  */
1307
1321
  useImportRestrictions?: RuleConfiguration_for_Null;
1322
+ /**
1323
+ * Enforce specifying the name of GraphQL operations.
1324
+ */
1325
+ useNamedOperation?: RuleFixConfiguration_for_Null;
1308
1326
  /**
1309
1327
  * Enforce the sorting of CSS utility classes.
1310
1328
  */
@@ -1546,7 +1564,7 @@ interface Style {
1546
1564
  /**
1547
1565
  * Prevent extra closing tags for components without children
1548
1566
  */
1549
- useSelfClosingElements?: RuleFixConfiguration_for_Null;
1567
+ useSelfClosingElements?: RuleFixConfiguration_for_UseSelfClosingElementsOptions;
1550
1568
  /**
1551
1569
  * When expressing array types, this rule promotes the usage of T\[] shorthand instead of Array\<T>.
1552
1570
  */
@@ -1776,7 +1794,7 @@ interface Suspicious {
1776
1794
  /**
1777
1795
  * Disallow direct use of Object.prototype builtins.
1778
1796
  */
1779
- noPrototypeBuiltins?: RuleConfiguration_for_Null;
1797
+ noPrototypeBuiltins?: RuleFixConfiguration_for_Null;
1780
1798
  /**
1781
1799
  * Prevents React-specific JSX properties from being used.
1782
1800
  */
@@ -1913,7 +1931,12 @@ interface OverrideOrganizeImportsConfiguration {
1913
1931
  */
1914
1932
  enabled?: boolean;
1915
1933
  }
1916
- type RuleAssistConfiguration = "on" | "off";
1934
+ type RuleAssistConfiguration_for_Options =
1935
+ | RuleAssistPlainConfiguration
1936
+ | RuleAssistWithOptions_for_Options;
1937
+ type RuleAssistConfiguration_for_Null =
1938
+ | RuleAssistPlainConfiguration
1939
+ | RuleAssistWithOptions_for_Null;
1917
1940
  type RuleFixConfiguration_for_Null =
1918
1941
  | RulePlainConfiguration
1919
1942
  | RuleWithFixOptions_for_Null;
@@ -1974,12 +1997,36 @@ type RuleConfiguration_for_FilenamingConventionOptions =
1974
1997
  type RuleFixConfiguration_for_NamingConventionOptions =
1975
1998
  | RulePlainConfiguration
1976
1999
  | RuleWithFixOptions_for_NamingConventionOptions;
2000
+ type RuleFixConfiguration_for_UseSelfClosingElementsOptions =
2001
+ | RulePlainConfiguration
2002
+ | RuleWithFixOptions_for_UseSelfClosingElementsOptions;
1977
2003
  type RuleFixConfiguration_for_NoConsoleOptions =
1978
2004
  | RulePlainConfiguration
1979
2005
  | RuleWithFixOptions_for_NoConsoleOptions;
1980
2006
  type RuleFixConfiguration_for_NoDoubleEqualsOptions =
1981
2007
  | RulePlainConfiguration
1982
2008
  | RuleWithFixOptions_for_NoDoubleEqualsOptions;
2009
+ type RuleAssistPlainConfiguration = "on" | "off";
2010
+ interface RuleAssistWithOptions_for_Options {
2011
+ /**
2012
+ * The severity of the emitted diagnostics by the rule
2013
+ */
2014
+ level: RuleAssistPlainConfiguration;
2015
+ /**
2016
+ * Rule's options
2017
+ */
2018
+ options: Options;
2019
+ }
2020
+ interface RuleAssistWithOptions_for_Null {
2021
+ /**
2022
+ * The severity of the emitted diagnostics by the rule
2023
+ */
2024
+ level: RuleAssistPlainConfiguration;
2025
+ /**
2026
+ * Rule's options
2027
+ */
2028
+ options: null;
2029
+ }
1983
2030
  type RulePlainConfiguration = "warn" | "error" | "info" | "off";
1984
2031
  interface RuleWithFixOptions_for_Null {
1985
2032
  /**
@@ -2213,6 +2260,20 @@ interface RuleWithFixOptions_for_NamingConventionOptions {
2213
2260
  */
2214
2261
  options: NamingConventionOptions;
2215
2262
  }
2263
+ interface RuleWithFixOptions_for_UseSelfClosingElementsOptions {
2264
+ /**
2265
+ * The kind of the code actions emitted by the rule
2266
+ */
2267
+ fix?: FixKind;
2268
+ /**
2269
+ * The severity of the emitted diagnostics by the rule
2270
+ */
2271
+ level: RulePlainConfiguration;
2272
+ /**
2273
+ * Rule's options
2274
+ */
2275
+ options: UseSelfClosingElementsOptions;
2276
+ }
2216
2277
  interface RuleWithFixOptions_for_NoConsoleOptions {
2217
2278
  /**
2218
2279
  * The kind of the code actions emitted by the rule
@@ -2241,6 +2302,10 @@ interface RuleWithFixOptions_for_NoDoubleEqualsOptions {
2241
2302
  */
2242
2303
  options: NoDoubleEqualsOptions;
2243
2304
  }
2305
+ interface Options {
2306
+ importGroups?: ImportGroup[];
2307
+ legacy?: boolean;
2308
+ }
2244
2309
  type FixKind = "none" | "safe" | "unsafe";
2245
2310
  interface AllowDomainOptions {
2246
2311
  /**
@@ -2351,6 +2416,10 @@ interface FilenamingConventionOptions {
2351
2416
  * Allowed cases for file names.
2352
2417
  */
2353
2418
  filenameCases: FilenameCases;
2419
+ /**
2420
+ * Regular expression to enforce
2421
+ */
2422
+ match?: Regex;
2354
2423
  /**
2355
2424
  * If `false`, then non-ASCII characters are allowed.
2356
2425
  */
@@ -2378,6 +2447,9 @@ interface NamingConventionOptions {
2378
2447
  */
2379
2448
  strictCase: boolean;
2380
2449
  }
2450
+ interface UseSelfClosingElementsOptions {
2451
+ ignoreHtmlElements?: boolean;
2452
+ }
2381
2453
  interface NoConsoleOptions {
2382
2454
  /**
2383
2455
  * Allowed calls on the console object.
@@ -2392,6 +2464,7 @@ If `false`, no such exception will be made.
2392
2464
  */
2393
2465
  ignoreNull: boolean;
2394
2466
  }
2467
+ type ImportGroup = PredefinedImportGroup | Regex;
2395
2468
  interface Hook {
2396
2469
  /**
2397
2470
  * The "position" of the closure function, starting from zero.
@@ -2421,6 +2494,7 @@ For example, for React's `useRef()` hook the value would be `true`, while for `u
2421
2494
  type Accessibility = "noPublic" | "explicit" | "none";
2422
2495
  type ConsistentArrayType = "shorthand" | "generic";
2423
2496
  type FilenameCases = FilenameCase[];
2497
+ type Regex = string;
2424
2498
  interface Convention {
2425
2499
  /**
2426
2500
  * String cases to enforce
@@ -2436,6 +2510,7 @@ interface Convention {
2436
2510
  selector: Selector;
2437
2511
  }
2438
2512
  type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2513
+ type PredefinedImportGroup = ":blank-line:" | ":bun:" | ":node:" | ":types:";
2439
2514
  type StableHookResult = boolean | number[];
2440
2515
  type FilenameCase =
2441
2516
  | "camelCase"
@@ -2444,7 +2519,6 @@ type FilenameCase =
2444
2519
  | "PascalCase"
2445
2520
  | "snake_case";
2446
2521
  type Formats = Format[];
2447
- type Regex = string;
2448
2522
  interface Selector {
2449
2523
  /**
2450
2524
  * Declaration kind
@@ -2797,6 +2871,7 @@ type Category =
2797
2871
  | "lint/nursery/noUnusedFunctionParameters"
2798
2872
  | "lint/nursery/noUselessEscapeInRegex"
2799
2873
  | "lint/nursery/noUselessStringRaw"
2874
+ | "lint/nursery/noUselessUndefined"
2800
2875
  | "lint/nursery/noValueAtRule"
2801
2876
  | "lint/nursery/useAdjacentOverloadSignatures"
2802
2877
  | "lint/nursery/useAriaPropsSupportedByRole"
@@ -2810,9 +2885,11 @@ type Category =
2810
2885
  | "lint/nursery/useExplicitFunctionReturnType"
2811
2886
  | "lint/nursery/useExplicitType"
2812
2887
  | "lint/nursery/useGoogleFontDisplay"
2888
+ | "lint/nursery/useGoogleFontPreconnect"
2813
2889
  | "lint/nursery/useGuardForIn"
2814
2890
  | "lint/nursery/useImportRestrictions"
2815
2891
  | "lint/nursery/useJsxCurlyBraceConvention"
2892
+ | "lint/nursery/useNamedOperation"
2816
2893
  | "lint/nursery/useSortedClasses"
2817
2894
  | "lint/nursery/useStrictMode"
2818
2895
  | "lint/nursery/useTrimStartEnd"
@@ -3119,7 +3196,7 @@ interface FixFileParams {
3119
3196
  should_format: boolean;
3120
3197
  skip: RuleCode[];
3121
3198
  }
3122
- type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes";
3199
+ type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes" | "ApplySuppressions";
3123
3200
  interface FixFileResult {
3124
3201
  /**
3125
3202
  * List of all the code actions applied to the file
@@ -3165,119 +3242,113 @@ interface RenameResult {
3165
3242
  }
3166
3243
 
3167
3244
 
3168
- /**
3169
- */
3170
3245
  export class DiagnosticPrinter {
3171
3246
  free(): void;
3172
- /**
3173
- * @param {string} file_name
3174
- * @param {string} file_source
3175
- */
3247
+ /**
3248
+ * @param {string} file_name
3249
+ * @param {string} file_source
3250
+ */
3176
3251
  constructor(file_name: string, file_source: string);
3177
- /**
3178
- * @param {Diagnostic} diagnostic
3179
- */
3252
+ /**
3253
+ * @param {Diagnostic} diagnostic
3254
+ */
3180
3255
  print_simple(diagnostic: Diagnostic): void;
3181
- /**
3182
- * @param {Diagnostic} diagnostic
3183
- */
3256
+ /**
3257
+ * @param {Diagnostic} diagnostic
3258
+ */
3184
3259
  print_verbose(diagnostic: Diagnostic): void;
3185
- /**
3186
- * @returns {string}
3187
- */
3260
+ /**
3261
+ * @returns {string}
3262
+ */
3188
3263
  finish(): string;
3189
3264
  }
3190
- /**
3191
- */
3192
3265
  export class Workspace {
3193
3266
  free(): void;
3194
- /**
3195
- */
3196
3267
  constructor();
3197
- /**
3198
- * @param {SupportsFeatureParams} params
3199
- * @returns {FileFeaturesResult}
3200
- */
3268
+ /**
3269
+ * @param {SupportsFeatureParams} params
3270
+ * @returns {FileFeaturesResult}
3271
+ */
3201
3272
  fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3202
- /**
3203
- * @param {UpdateSettingsParams} params
3204
- */
3273
+ /**
3274
+ * @param {UpdateSettingsParams} params
3275
+ */
3205
3276
  updateSettings(params: UpdateSettingsParams): void;
3206
- /**
3207
- * @param {RegisterProjectFolderParams} params
3208
- * @returns {ProjectKey}
3209
- */
3277
+ /**
3278
+ * @param {RegisterProjectFolderParams} params
3279
+ * @returns {ProjectKey}
3280
+ */
3210
3281
  registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
3211
- /**
3212
- * @param {OpenFileParams} params
3213
- */
3282
+ /**
3283
+ * @param {OpenFileParams} params
3284
+ */
3214
3285
  openFile(params: OpenFileParams): void;
3215
- /**
3216
- * @param {GetFileContentParams} params
3217
- * @returns {string}
3218
- */
3286
+ /**
3287
+ * @param {GetFileContentParams} params
3288
+ * @returns {string}
3289
+ */
3219
3290
  getFileContent(params: GetFileContentParams): string;
3220
- /**
3221
- * @param {GetSyntaxTreeParams} params
3222
- * @returns {GetSyntaxTreeResult}
3223
- */
3291
+ /**
3292
+ * @param {GetSyntaxTreeParams} params
3293
+ * @returns {GetSyntaxTreeResult}
3294
+ */
3224
3295
  getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
3225
- /**
3226
- * @param {GetControlFlowGraphParams} params
3227
- * @returns {string}
3228
- */
3296
+ /**
3297
+ * @param {GetControlFlowGraphParams} params
3298
+ * @returns {string}
3299
+ */
3229
3300
  getControlFlowGraph(params: GetControlFlowGraphParams): string;
3230
- /**
3231
- * @param {GetFormatterIRParams} params
3232
- * @returns {string}
3233
- */
3301
+ /**
3302
+ * @param {GetFormatterIRParams} params
3303
+ * @returns {string}
3304
+ */
3234
3305
  getFormatterIr(params: GetFormatterIRParams): string;
3235
- /**
3236
- * @param {ChangeFileParams} params
3237
- */
3306
+ /**
3307
+ * @param {ChangeFileParams} params
3308
+ */
3238
3309
  changeFile(params: ChangeFileParams): void;
3239
- /**
3240
- * @param {CloseFileParams} params
3241
- */
3310
+ /**
3311
+ * @param {CloseFileParams} params
3312
+ */
3242
3313
  closeFile(params: CloseFileParams): void;
3243
- /**
3244
- * @param {PullDiagnosticsParams} params
3245
- * @returns {PullDiagnosticsResult}
3246
- */
3314
+ /**
3315
+ * @param {PullDiagnosticsParams} params
3316
+ * @returns {PullDiagnosticsResult}
3317
+ */
3247
3318
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
3248
- /**
3249
- * @param {PullActionsParams} params
3250
- * @returns {PullActionsResult}
3251
- */
3319
+ /**
3320
+ * @param {PullActionsParams} params
3321
+ * @returns {PullActionsResult}
3322
+ */
3252
3323
  pullActions(params: PullActionsParams): PullActionsResult;
3253
- /**
3254
- * @param {FormatFileParams} params
3255
- * @returns {any}
3256
- */
3324
+ /**
3325
+ * @param {FormatFileParams} params
3326
+ * @returns {any}
3327
+ */
3257
3328
  formatFile(params: FormatFileParams): any;
3258
- /**
3259
- * @param {FormatRangeParams} params
3260
- * @returns {any}
3261
- */
3329
+ /**
3330
+ * @param {FormatRangeParams} params
3331
+ * @returns {any}
3332
+ */
3262
3333
  formatRange(params: FormatRangeParams): any;
3263
- /**
3264
- * @param {FormatOnTypeParams} params
3265
- * @returns {any}
3266
- */
3334
+ /**
3335
+ * @param {FormatOnTypeParams} params
3336
+ * @returns {any}
3337
+ */
3267
3338
  formatOnType(params: FormatOnTypeParams): any;
3268
- /**
3269
- * @param {FixFileParams} params
3270
- * @returns {FixFileResult}
3271
- */
3339
+ /**
3340
+ * @param {FixFileParams} params
3341
+ * @returns {FixFileResult}
3342
+ */
3272
3343
  fixFile(params: FixFileParams): FixFileResult;
3273
- /**
3274
- * @param {OrganizeImportsParams} params
3275
- * @returns {OrganizeImportsResult}
3276
- */
3344
+ /**
3345
+ * @param {OrganizeImportsParams} params
3346
+ * @returns {OrganizeImportsResult}
3347
+ */
3277
3348
  organizeImports(params: OrganizeImportsParams): OrganizeImportsResult;
3278
- /**
3279
- * @param {RenameParams} params
3280
- * @returns {RenameResult}
3281
- */
3349
+ /**
3350
+ * @param {RenameParams} params
3351
+ * @returns {RenameResult}
3352
+ */
3282
3353
  rename(params: RenameParams): RenameResult;
3283
3354
  }