@biomejs/wasm-nodejs 1.9.5-nightly.92879ae → 1.9.5-nightly.c0cccb2

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";
@@ -1014,11 +1020,11 @@ interface Correctness {
1014
1020
  /**
1015
1021
  * Disallow the use of dependencies that aren't specified in the package.json.
1016
1022
  */
1017
- noUndeclaredDependencies?: RuleConfiguration_for_Null;
1023
+ noUndeclaredDependencies?: RuleConfiguration_for_NoUndeclaredDependenciesOptions;
1018
1024
  /**
1019
1025
  * Prevents the usage of variables that haven't been declared inside the document.
1020
1026
  */
1021
- noUndeclaredVariables?: RuleConfiguration_for_Null;
1027
+ noUndeclaredVariables?: RuleConfiguration_for_UndeclaredVariablesOptions;
1022
1028
  /**
1023
1029
  * Disallow unknown CSS value functions.
1024
1030
  */
@@ -1173,6 +1179,10 @@ interface Nursery {
1173
1179
  * Disallow exporting an imported variable.
1174
1180
  */
1175
1181
  noExportedImports?: RuleConfiguration_for_Null;
1182
+ /**
1183
+ * Disallow the use of __dirname and __filename in the global scope.
1184
+ */
1185
+ noGlobalDirnameFilename?: RuleFixConfiguration_for_Null;
1176
1186
  /**
1177
1187
  * Prevent usage of \<head> element in a Next.js project.
1178
1188
  */
@@ -1301,6 +1311,10 @@ interface Nursery {
1301
1311
  * Enforces the use of a recommended display strategy with Google Fonts.
1302
1312
  */
1303
1313
  useGoogleFontDisplay?: RuleConfiguration_for_Null;
1314
+ /**
1315
+ * Ensure the preconnect attribute is used when using Google Fonts.
1316
+ */
1317
+ useGoogleFontPreconnect?: RuleFixConfiguration_for_Null;
1304
1318
  /**
1305
1319
  * Require for-in loops to include an if statement.
1306
1320
  */
@@ -1309,6 +1323,10 @@ interface Nursery {
1309
1323
  * Disallows package private imports.
1310
1324
  */
1311
1325
  useImportRestrictions?: RuleConfiguration_for_Null;
1326
+ /**
1327
+ * Enforce specifying the name of GraphQL operations.
1328
+ */
1329
+ useNamedOperation?: RuleFixConfiguration_for_Null;
1312
1330
  /**
1313
1331
  * Enforce the sorting of CSS utility classes.
1314
1332
  */
@@ -1862,7 +1880,7 @@ interface Suspicious {
1862
1880
  */
1863
1881
  useNumberToFixedDigitsArgument?: RuleFixConfiguration_for_Null;
1864
1882
  /**
1865
- * 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
1883
+ * This rule checks that the result of a `typeof' expression is compared to a valid value.
1866
1884
  */
1867
1885
  useValidTypeof?: RuleFixConfiguration_for_Null;
1868
1886
  }
@@ -1917,7 +1935,12 @@ interface OverrideOrganizeImportsConfiguration {
1917
1935
  */
1918
1936
  enabled?: boolean;
1919
1937
  }
1920
- type RuleAssistConfiguration = "on" | "off";
1938
+ type RuleAssistConfiguration_for_Options =
1939
+ | RuleAssistPlainConfiguration
1940
+ | RuleAssistWithOptions_for_Options;
1941
+ type RuleAssistConfiguration_for_Null =
1942
+ | RuleAssistPlainConfiguration
1943
+ | RuleAssistWithOptions_for_Null;
1921
1944
  type RuleFixConfiguration_for_Null =
1922
1945
  | RulePlainConfiguration
1923
1946
  | RuleWithFixOptions_for_Null;
@@ -1936,6 +1959,12 @@ type RuleFixConfiguration_for_ValidAriaRoleOptions =
1936
1959
  type RuleConfiguration_for_ComplexityOptions =
1937
1960
  | RulePlainConfiguration
1938
1961
  | RuleWithOptions_for_ComplexityOptions;
1962
+ type RuleConfiguration_for_NoUndeclaredDependenciesOptions =
1963
+ | RulePlainConfiguration
1964
+ | RuleWithOptions_for_NoUndeclaredDependenciesOptions;
1965
+ type RuleConfiguration_for_UndeclaredVariablesOptions =
1966
+ | RulePlainConfiguration
1967
+ | RuleWithOptions_for_UndeclaredVariablesOptions;
1939
1968
  type RuleConfiguration_for_UseExhaustiveDependenciesOptions =
1940
1969
  | RulePlainConfiguration
1941
1970
  | RuleWithOptions_for_UseExhaustiveDependenciesOptions;
@@ -1987,6 +2016,27 @@ type RuleFixConfiguration_for_NoConsoleOptions =
1987
2016
  type RuleFixConfiguration_for_NoDoubleEqualsOptions =
1988
2017
  | RulePlainConfiguration
1989
2018
  | RuleWithFixOptions_for_NoDoubleEqualsOptions;
2019
+ type RuleAssistPlainConfiguration = "on" | "off";
2020
+ interface RuleAssistWithOptions_for_Options {
2021
+ /**
2022
+ * The severity of the emitted diagnostics by the rule
2023
+ */
2024
+ level: RuleAssistPlainConfiguration;
2025
+ /**
2026
+ * Rule's options
2027
+ */
2028
+ options: Options;
2029
+ }
2030
+ interface RuleAssistWithOptions_for_Null {
2031
+ /**
2032
+ * The severity of the emitted diagnostics by the rule
2033
+ */
2034
+ level: RuleAssistPlainConfiguration;
2035
+ /**
2036
+ * Rule's options
2037
+ */
2038
+ options: null;
2039
+ }
1990
2040
  type RulePlainConfiguration = "warn" | "error" | "info" | "off";
1991
2041
  interface RuleWithFixOptions_for_Null {
1992
2042
  /**
@@ -2060,6 +2110,26 @@ interface RuleWithOptions_for_ComplexityOptions {
2060
2110
  */
2061
2111
  options: ComplexityOptions;
2062
2112
  }
2113
+ interface RuleWithOptions_for_NoUndeclaredDependenciesOptions {
2114
+ /**
2115
+ * The severity of the emitted diagnostics by the rule
2116
+ */
2117
+ level: RulePlainConfiguration;
2118
+ /**
2119
+ * Rule's options
2120
+ */
2121
+ options: NoUndeclaredDependenciesOptions;
2122
+ }
2123
+ interface RuleWithOptions_for_UndeclaredVariablesOptions {
2124
+ /**
2125
+ * The severity of the emitted diagnostics by the rule
2126
+ */
2127
+ level: RulePlainConfiguration;
2128
+ /**
2129
+ * Rule's options
2130
+ */
2131
+ options: UndeclaredVariablesOptions;
2132
+ }
2063
2133
  interface RuleWithOptions_for_UseExhaustiveDependenciesOptions {
2064
2134
  /**
2065
2135
  * The severity of the emitted diagnostics by the rule
@@ -2262,6 +2332,10 @@ interface RuleWithFixOptions_for_NoDoubleEqualsOptions {
2262
2332
  */
2263
2333
  options: NoDoubleEqualsOptions;
2264
2334
  }
2335
+ interface Options {
2336
+ importGroups?: ImportGroup[];
2337
+ legacy?: boolean;
2338
+ }
2265
2339
  type FixKind = "none" | "safe" | "unsafe";
2266
2340
  interface AllowDomainOptions {
2267
2341
  /**
@@ -2293,6 +2367,26 @@ interface ComplexityOptions {
2293
2367
  */
2294
2368
  maxAllowedComplexity?: number;
2295
2369
  }
2370
+ interface NoUndeclaredDependenciesOptions {
2371
+ /**
2372
+ * If set to `false`, then the rule will show an error when `devDependencies` are imported. Defaults to `true`.
2373
+ */
2374
+ devDependencies?: DependencyAvailability;
2375
+ /**
2376
+ * If set to `false`, then the rule will show an error when `optionalDependencies` are imported. Defaults to `true`.
2377
+ */
2378
+ optionalDependencies?: DependencyAvailability;
2379
+ /**
2380
+ * If set to `false`, then the rule will show an error when `peerDependencies` are imported. Defaults to `true`.
2381
+ */
2382
+ peerDependencies?: DependencyAvailability;
2383
+ }
2384
+ interface UndeclaredVariablesOptions {
2385
+ /**
2386
+ * Check undeclared types.
2387
+ */
2388
+ checkTypes?: boolean;
2389
+ }
2296
2390
  interface UseExhaustiveDependenciesOptions {
2297
2391
  /**
2298
2392
  * List of hooks of which the dependencies should be validated.
@@ -2420,6 +2514,8 @@ If `false`, no such exception will be made.
2420
2514
  */
2421
2515
  ignoreNull: boolean;
2422
2516
  }
2517
+ type ImportGroup = PredefinedImportGroup | Regex;
2518
+ type DependencyAvailability = boolean | string[];
2423
2519
  interface Hook {
2424
2520
  /**
2425
2521
  * The "position" of the closure function, starting from zero.
@@ -2465,6 +2561,7 @@ interface Convention {
2465
2561
  selector: Selector;
2466
2562
  }
2467
2563
  type Format = "camelCase" | "CONSTANT_CASE" | "PascalCase" | "snake_case";
2564
+ type PredefinedImportGroup = ":blank-line:" | ":bun:" | ":node:" | ":types:";
2468
2565
  type StableHookResult = boolean | number[];
2469
2566
  type FilenameCase =
2470
2567
  | "camelCase"
@@ -2790,6 +2887,7 @@ type Category =
2790
2887
  | "lint/nursery/noDynamicNamespaceImportAccess"
2791
2888
  | "lint/nursery/noEnum"
2792
2889
  | "lint/nursery/noExportedImports"
2890
+ | "lint/nursery/noGlobalDirnameFilename"
2793
2891
  | "lint/nursery/noHeadElement"
2794
2892
  | "lint/nursery/noHeadImportInDocument"
2795
2893
  | "lint/nursery/noImgElement"
@@ -2839,9 +2937,11 @@ type Category =
2839
2937
  | "lint/nursery/useExplicitFunctionReturnType"
2840
2938
  | "lint/nursery/useExplicitType"
2841
2939
  | "lint/nursery/useGoogleFontDisplay"
2940
+ | "lint/nursery/useGoogleFontPreconnect"
2842
2941
  | "lint/nursery/useGuardForIn"
2843
2942
  | "lint/nursery/useImportRestrictions"
2844
2943
  | "lint/nursery/useJsxCurlyBraceConvention"
2944
+ | "lint/nursery/useNamedOperation"
2845
2945
  | "lint/nursery/useSortedClasses"
2846
2946
  | "lint/nursery/useStrictMode"
2847
2947
  | "lint/nursery/useTrimStartEnd"
@@ -3080,6 +3180,7 @@ interface PullActionsParams {
3080
3180
  path: BiomePath;
3081
3181
  range?: TextRange;
3082
3182
  skip: RuleCode[];
3183
+ suppression_reason?: string;
3083
3184
  }
3084
3185
  interface PullActionsResult {
3085
3186
  actions: CodeAction[];
@@ -3090,7 +3191,7 @@ interface CodeAction {
3090
3191
  suggestion: CodeSuggestion;
3091
3192
  }
3092
3193
  type ActionCategory =
3093
- | "QuickFix"
3194
+ | { QuickFix: string }
3094
3195
  | { Refactor: RefactorKind }
3095
3196
  | { Source: SourceActionKind }
3096
3197
  | { Other: string };
@@ -3147,6 +3248,7 @@ interface FixFileParams {
3147
3248
  rule_categories: RuleCategories;
3148
3249
  should_format: boolean;
3149
3250
  skip: RuleCode[];
3251
+ suppression_reason?: string;
3150
3252
  }
3151
3253
  type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes" | "ApplySuppressions";
3152
3254
  interface FixFileResult {
@@ -3194,119 +3296,113 @@ interface RenameResult {
3194
3296
  }
3195
3297
 
3196
3298
 
3197
- /**
3198
- */
3199
3299
  export class DiagnosticPrinter {
3200
3300
  free(): void;
3201
- /**
3202
- * @param {string} file_name
3203
- * @param {string} file_source
3204
- */
3301
+ /**
3302
+ * @param {string} file_name
3303
+ * @param {string} file_source
3304
+ */
3205
3305
  constructor(file_name: string, file_source: string);
3206
- /**
3207
- * @param {Diagnostic} diagnostic
3208
- */
3306
+ /**
3307
+ * @param {Diagnostic} diagnostic
3308
+ */
3209
3309
  print_simple(diagnostic: Diagnostic): void;
3210
- /**
3211
- * @param {Diagnostic} diagnostic
3212
- */
3310
+ /**
3311
+ * @param {Diagnostic} diagnostic
3312
+ */
3213
3313
  print_verbose(diagnostic: Diagnostic): void;
3214
- /**
3215
- * @returns {string}
3216
- */
3314
+ /**
3315
+ * @returns {string}
3316
+ */
3217
3317
  finish(): string;
3218
3318
  }
3219
- /**
3220
- */
3221
3319
  export class Workspace {
3222
3320
  free(): void;
3223
- /**
3224
- */
3225
3321
  constructor();
3226
- /**
3227
- * @param {SupportsFeatureParams} params
3228
- * @returns {FileFeaturesResult}
3229
- */
3322
+ /**
3323
+ * @param {SupportsFeatureParams} params
3324
+ * @returns {FileFeaturesResult}
3325
+ */
3230
3326
  fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3231
- /**
3232
- * @param {UpdateSettingsParams} params
3233
- */
3327
+ /**
3328
+ * @param {UpdateSettingsParams} params
3329
+ */
3234
3330
  updateSettings(params: UpdateSettingsParams): void;
3235
- /**
3236
- * @param {RegisterProjectFolderParams} params
3237
- * @returns {ProjectKey}
3238
- */
3331
+ /**
3332
+ * @param {RegisterProjectFolderParams} params
3333
+ * @returns {ProjectKey}
3334
+ */
3239
3335
  registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
3240
- /**
3241
- * @param {OpenFileParams} params
3242
- */
3336
+ /**
3337
+ * @param {OpenFileParams} params
3338
+ */
3243
3339
  openFile(params: OpenFileParams): void;
3244
- /**
3245
- * @param {GetFileContentParams} params
3246
- * @returns {string}
3247
- */
3340
+ /**
3341
+ * @param {GetFileContentParams} params
3342
+ * @returns {string}
3343
+ */
3248
3344
  getFileContent(params: GetFileContentParams): string;
3249
- /**
3250
- * @param {GetSyntaxTreeParams} params
3251
- * @returns {GetSyntaxTreeResult}
3252
- */
3345
+ /**
3346
+ * @param {GetSyntaxTreeParams} params
3347
+ * @returns {GetSyntaxTreeResult}
3348
+ */
3253
3349
  getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
3254
- /**
3255
- * @param {GetControlFlowGraphParams} params
3256
- * @returns {string}
3257
- */
3350
+ /**
3351
+ * @param {GetControlFlowGraphParams} params
3352
+ * @returns {string}
3353
+ */
3258
3354
  getControlFlowGraph(params: GetControlFlowGraphParams): string;
3259
- /**
3260
- * @param {GetFormatterIRParams} params
3261
- * @returns {string}
3262
- */
3355
+ /**
3356
+ * @param {GetFormatterIRParams} params
3357
+ * @returns {string}
3358
+ */
3263
3359
  getFormatterIr(params: GetFormatterIRParams): string;
3264
- /**
3265
- * @param {ChangeFileParams} params
3266
- */
3360
+ /**
3361
+ * @param {ChangeFileParams} params
3362
+ */
3267
3363
  changeFile(params: ChangeFileParams): void;
3268
- /**
3269
- * @param {CloseFileParams} params
3270
- */
3364
+ /**
3365
+ * @param {CloseFileParams} params
3366
+ */
3271
3367
  closeFile(params: CloseFileParams): void;
3272
- /**
3273
- * @param {PullDiagnosticsParams} params
3274
- * @returns {PullDiagnosticsResult}
3275
- */
3368
+ /**
3369
+ * @param {PullDiagnosticsParams} params
3370
+ * @returns {PullDiagnosticsResult}
3371
+ */
3276
3372
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
3277
- /**
3278
- * @param {PullActionsParams} params
3279
- * @returns {PullActionsResult}
3280
- */
3373
+ /**
3374
+ * @param {PullActionsParams} params
3375
+ * @returns {PullActionsResult}
3376
+ */
3281
3377
  pullActions(params: PullActionsParams): PullActionsResult;
3282
- /**
3283
- * @param {FormatFileParams} params
3284
- * @returns {any}
3285
- */
3378
+ /**
3379
+ * @param {FormatFileParams} params
3380
+ * @returns {any}
3381
+ */
3286
3382
  formatFile(params: FormatFileParams): any;
3287
- /**
3288
- * @param {FormatRangeParams} params
3289
- * @returns {any}
3290
- */
3383
+ /**
3384
+ * @param {FormatRangeParams} params
3385
+ * @returns {any}
3386
+ */
3291
3387
  formatRange(params: FormatRangeParams): any;
3292
- /**
3293
- * @param {FormatOnTypeParams} params
3294
- * @returns {any}
3295
- */
3388
+ /**
3389
+ * @param {FormatOnTypeParams} params
3390
+ * @returns {any}
3391
+ */
3296
3392
  formatOnType(params: FormatOnTypeParams): any;
3297
- /**
3298
- * @param {FixFileParams} params
3299
- * @returns {FixFileResult}
3300
- */
3393
+ /**
3394
+ * @param {FixFileParams} params
3395
+ * @returns {FixFileResult}
3396
+ */
3301
3397
  fixFile(params: FixFileParams): FixFileResult;
3302
- /**
3303
- * @param {OrganizeImportsParams} params
3304
- * @returns {OrganizeImportsResult}
3305
- */
3398
+ /**
3399
+ * @param {OrganizeImportsParams} params
3400
+ * @returns {OrganizeImportsResult}
3401
+ */
3306
3402
  organizeImports(params: OrganizeImportsParams): OrganizeImportsResult;
3307
- /**
3308
- * @param {RenameParams} params
3309
- * @returns {RenameResult}
3310
- */
3403
+ /**
3404
+ * @param {RenameParams} params
3405
+ * @returns {RenameResult}
3406
+ */
3311
3407
  rename(params: RenameParams): RenameResult;
3312
3408
  }