@biomejs/wasm-nodejs 1.8.3 → 1.8.4-nightly.bd1d0c6

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,13 +4,14 @@
4
4
  */
5
5
  export function main(): void;
6
6
  interface SupportsFeatureParams {
7
- features: FeatureName[];
7
+ features: FeatureName;
8
8
  path: BiomePath;
9
9
  }
10
- type FeatureName = "Format" | "Lint" | "OrganizeImports" | "Search";
10
+ type FeatureName = FeatureKind[];
11
11
  interface BiomePath {
12
12
  path: string;
13
13
  }
14
+ type FeatureKind = "Format" | "Lint" | "OrganizeImports" | "Search" | "Assists";
14
15
  interface SupportsFeatureResult {
15
16
  reason?: SupportKind;
16
17
  }
@@ -47,6 +48,10 @@ interface PartialConfiguration {
47
48
  * The configuration of the formatter
48
49
  */
49
50
  formatter?: PartialFormatterConfiguration;
51
+ /**
52
+ * Specific configuration for the GraphQL language
53
+ */
54
+ graphql?: PartialGraphqlConfiguration;
50
55
  /**
51
56
  * Specific configuration for the JavaScript language
52
57
  */
@@ -110,6 +115,10 @@ interface PartialFormatterConfiguration {
110
115
  * The attribute position style in HTMLish languages. By default auto.
111
116
  */
112
117
  attributePosition?: AttributePosition;
118
+ /**
119
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
120
+ */
121
+ bracketSpacing?: BracketSpacing;
113
122
  enabled?: boolean;
114
123
  /**
115
124
  * Stores whether formatting should be allowed to proceed if a given file has syntax errors
@@ -143,6 +152,17 @@ interface PartialFormatterConfiguration {
143
152
  * What's the max width of a line. Defaults to 80.
144
153
  */
145
154
  lineWidth?: LineWidth;
155
+ /**
156
+ * Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false.
157
+ */
158
+ useEditorconfig?: boolean;
159
+ }
160
+ interface PartialGraphqlConfiguration {
161
+ /**
162
+ * GraphQL formatter options
163
+ */
164
+ formatter?: PartialGraphqlFormatter;
165
+ linter?: PartialGraphqlLinter;
146
166
  }
147
167
  interface PartialJavascriptConfiguration {
148
168
  /**
@@ -283,10 +303,47 @@ interface PartialCssParser {
283
303
  cssModules?: boolean;
284
304
  }
285
305
  type AttributePosition = "auto" | "multiline";
306
+ type BracketSpacing = boolean;
286
307
  type IndentWidth = number;
287
308
  type PlainIndentStyle = "tab" | "space";
288
309
  type LineEnding = "lf" | "crlf" | "cr";
289
310
  type LineWidth = number;
311
+ interface PartialGraphqlFormatter {
312
+ /**
313
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
314
+ */
315
+ bracketSpacing?: BracketSpacing;
316
+ /**
317
+ * Control the formatter for GraphQL files.
318
+ */
319
+ enabled?: boolean;
320
+ /**
321
+ * The indent style applied to GraphQL files.
322
+ */
323
+ indentStyle?: PlainIndentStyle;
324
+ /**
325
+ * The size of the indentation applied to GraphQL files. Default to 2.
326
+ */
327
+ indentWidth?: IndentWidth;
328
+ /**
329
+ * The type of line ending applied to GraphQL files.
330
+ */
331
+ lineEnding?: LineEnding;
332
+ /**
333
+ * What's the max width of a line applied to GraphQL files. Defaults to 80.
334
+ */
335
+ lineWidth?: LineWidth;
336
+ /**
337
+ * The type of quotes used in GraphQL code. Defaults to double.
338
+ */
339
+ quoteStyle?: QuoteStyle;
340
+ }
341
+ interface PartialGraphqlLinter {
342
+ /**
343
+ * Control the formatter for GraphQL files.
344
+ */
345
+ enabled?: boolean;
346
+ }
290
347
  interface PartialJavascriptFormatter {
291
348
  /**
292
349
  * Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
@@ -303,7 +360,7 @@ interface PartialJavascriptFormatter {
303
360
  /**
304
361
  * Whether to insert spaces around brackets in object literals. Defaults to true.
305
362
  */
306
- bracketSpacing?: boolean;
363
+ bracketSpacing?: BracketSpacing;
307
364
  /**
308
365
  * Control the formatter for JavaScript (and its super languages) files.
309
366
  */
@@ -442,6 +499,10 @@ interface OverridePattern {
442
499
  * Specific configuration for the Json language
443
500
  */
444
501
  formatter?: OverrideFormatterConfiguration;
502
+ /**
503
+ * Specific configuration for the Graphql language
504
+ */
505
+ graphql?: PartialGraphqlConfiguration;
445
506
  /**
446
507
  * A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
447
508
  */
@@ -937,6 +998,14 @@ interface Nursery {
937
998
  * Disallow duplicate selectors within keyframe blocks.
938
999
  */
939
1000
  noDuplicateSelectorsKeyframeBlock?: RuleConfiguration_for_Null;
1001
+ /**
1002
+ * No duplicated fields in GraphQL operations.
1003
+ */
1004
+ noDuplicatedFields?: RuleConfiguration_for_Null;
1005
+ /**
1006
+ * Disallow accessing namespace imports dynamically.
1007
+ */
1008
+ noDynamicNamespaceImportAccess?: RuleConfiguration_for_Null;
940
1009
  /**
941
1010
  * Disallow CSS empty blocks.
942
1011
  */
@@ -961,6 +1030,14 @@ interface Nursery {
961
1030
  * Disallow the use of @import at-rules in invalid positions.
962
1031
  */
963
1032
  noInvalidPositionAtImportRule?: RuleConfiguration_for_Null;
1033
+ /**
1034
+ * Disallows the use of irregular whitespace characters.
1035
+ */
1036
+ noIrregularWhitespace?: RuleConfiguration_for_Null;
1037
+ /**
1038
+ * Disallows the use of irregular whitespace.
1039
+ */
1040
+ noIrregularWhitespaceCss?: RuleConfiguration_for_Null;
964
1041
  /**
965
1042
  * Enforce that a label element or component has a text label and an associated input.
966
1043
  */
@@ -981,6 +1058,10 @@ interface Nursery {
981
1058
  * Disallow shorthand properties that override related longhand properties.
982
1059
  */
983
1060
  noShorthandPropertyOverrides?: RuleConfiguration_for_Null;
1061
+ /**
1062
+ * Enforce that static, visible elements (such as \<div>) that have click handlers use the valid role attribute.
1063
+ */
1064
+ noStaticElementInteractions?: RuleConfiguration_for_Null;
984
1065
  /**
985
1066
  * Enforce the use of String.slice() over String.substr() and String.substring().
986
1067
  */
@@ -1029,6 +1110,10 @@ interface Nursery {
1029
1110
  * Disallow initializing variables to undefined.
1030
1111
  */
1031
1112
  noUselessUndefinedInitialization?: RuleFixConfiguration_for_Null;
1113
+ /**
1114
+ * Disallow use of @value rule in css modules.
1115
+ */
1116
+ noValueAtRule?: RuleConfiguration_for_Null;
1032
1117
  /**
1033
1118
  * Disallow the use of yoda expressions.
1034
1119
  */
@@ -1045,6 +1130,10 @@ interface Nursery {
1045
1130
  * Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
1046
1131
  */
1047
1132
  useConsistentBuiltinInstantiation?: RuleFixConfiguration_for_Null;
1133
+ /**
1134
+ * This rule enforces consistent use of curly braces inside JSX attributes and JSX children.
1135
+ */
1136
+ useConsistentCurlyBraces?: RuleFixConfiguration_for_Null;
1048
1137
  /**
1049
1138
  * Disallows invalid named grid areas in CSS Grid Layouts.
1050
1139
  */
@@ -1080,7 +1169,7 @@ interface Nursery {
1080
1169
  /**
1081
1170
  * Enforce file extensions for relative imports.
1082
1171
  */
1083
- useImportExtensions?: RuleFixConfiguration_for_Null;
1172
+ useImportExtensions?: RuleFixConfiguration_for_UseImportExtensionsOptions;
1084
1173
  /**
1085
1174
  * Disallows package private imports.
1086
1175
  */
@@ -1097,6 +1186,10 @@ interface Nursery {
1097
1186
  * Enforce the sorting of CSS utility classes.
1098
1187
  */
1099
1188
  useSortedClasses?: RuleFixConfiguration_for_UtilityClassSortingOptions;
1189
+ /**
1190
+ * Enforce the use of the directive "use strict" in script files.
1191
+ */
1192
+ useStrictMode?: RuleFixConfiguration_for_Null;
1100
1193
  /**
1101
1194
  * Require new when throwing an error.
1102
1195
  */
@@ -1109,6 +1202,10 @@ interface Nursery {
1109
1202
  * Require regex literals to be declared at the top level.
1110
1203
  */
1111
1204
  useTopLevelRegex?: RuleConfiguration_for_Null;
1205
+ /**
1206
+ * Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
1207
+ */
1208
+ useTrimStartEnd?: RuleFixConfiguration_for_Null;
1112
1209
  /**
1113
1210
  * Use valid values for the autocomplete attribute on input elements.
1114
1211
  */
@@ -1579,6 +1676,10 @@ interface OverrideFormatterConfiguration {
1579
1676
  * The attribute position style.
1580
1677
  */
1581
1678
  attributePosition?: AttributePosition;
1679
+ /**
1680
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
1681
+ */
1682
+ bracketSpacing?: BracketSpacing;
1582
1683
  enabled?: boolean;
1583
1684
  /**
1584
1685
  * Stores whether formatting should be allowed to proceed if a given file has syntax errors
@@ -1645,6 +1746,9 @@ type RuleConfiguration_for_NoLabelWithoutControlOptions =
1645
1746
  type RuleConfiguration_for_RestrictedImportsOptions =
1646
1747
  | RulePlainConfiguration
1647
1748
  | RuleWithOptions_for_RestrictedImportsOptions;
1749
+ type RuleFixConfiguration_for_UseImportExtensionsOptions =
1750
+ | RulePlainConfiguration
1751
+ | RuleWithFixOptions_for_UseImportExtensionsOptions;
1648
1752
  type RuleFixConfiguration_for_UtilityClassSortingOptions =
1649
1753
  | RulePlainConfiguration
1650
1754
  | RuleWithFixOptions_for_UtilityClassSortingOptions;
@@ -1752,6 +1856,20 @@ interface RuleWithOptions_for_RestrictedImportsOptions {
1752
1856
  */
1753
1857
  options: RestrictedImportsOptions;
1754
1858
  }
1859
+ interface RuleWithFixOptions_for_UseImportExtensionsOptions {
1860
+ /**
1861
+ * The kind of the code actions emitted by the rule
1862
+ */
1863
+ fix?: FixKind;
1864
+ /**
1865
+ * The severity of the emitted diagnostics by the rule
1866
+ */
1867
+ level: RulePlainConfiguration;
1868
+ /**
1869
+ * Rule's options
1870
+ */
1871
+ options: UseImportExtensionsOptions;
1872
+ }
1755
1873
  interface RuleWithFixOptions_for_UtilityClassSortingOptions {
1756
1874
  /**
1757
1875
  * The kind of the code actions emitted by the rule
@@ -1862,6 +1980,12 @@ interface RestrictedImportsOptions {
1862
1980
  */
1863
1981
  paths: {};
1864
1982
  }
1983
+ interface UseImportExtensionsOptions {
1984
+ /**
1985
+ * 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
1986
+ */
1987
+ suggestedExtensions: {};
1988
+ }
1865
1989
  interface UtilityClassSortingOptions {
1866
1990
  /**
1867
1991
  * Additional attributes that will be sorted.
@@ -2074,13 +2198,16 @@ interface JsonFileSource {
2074
2198
  interface CssFileSource {
2075
2199
  variant: CssVariant;
2076
2200
  }
2077
- interface GraphqlFileSource {}
2201
+ interface GraphqlFileSource {
2202
+ variant: GraphqlVariant;
2203
+ }
2078
2204
  type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
2079
2205
  type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
2080
2206
  type ModuleKind = "Script" | "Module";
2081
2207
  type LanguageVariant = "Standard" | "StandardRestricted" | "Jsx";
2082
2208
  type LanguageVersion = "ES2022" | "ESNext";
2083
2209
  type CssVariant = "Standard";
2210
+ type GraphqlVariant = "Standard";
2084
2211
  interface ChangeFileParams {
2085
2212
  content: string;
2086
2213
  path: BiomePath;
@@ -2252,20 +2379,24 @@ type Category =
2252
2379
  | "lint/nursery/noDuplicateFontNames"
2253
2380
  | "lint/nursery/noDuplicateJsonKeys"
2254
2381
  | "lint/nursery/noDuplicateSelectorsKeyframeBlock"
2382
+ | "lint/nursery/noDuplicatedFields"
2383
+ | "lint/nursery/noDynamicNamespaceImportAccess"
2255
2384
  | "lint/nursery/noEmptyBlock"
2256
2385
  | "lint/nursery/noEvolvingTypes"
2257
2386
  | "lint/nursery/noExportedImports"
2258
2387
  | "lint/nursery/noImportantInKeyframe"
2259
2388
  | "lint/nursery/noInvalidDirectionInLinearGradient"
2260
2389
  | "lint/nursery/noInvalidPositionAtImportRule"
2390
+ | "lint/nursery/noIrregularWhitespace"
2391
+ | "lint/nursery/noIrregularWhitespaceCss"
2261
2392
  | "lint/nursery/noLabelWithoutControl"
2262
2393
  | "lint/nursery/noMisplacedAssertion"
2263
2394
  | "lint/nursery/noMissingGenericFamilyKeyword"
2264
2395
  | "lint/nursery/noReactSpecificProps"
2265
2396
  | "lint/nursery/noRestrictedImports"
2397
+ | "lint/nursery/noStaticElementInteractions"
2266
2398
  | "lint/nursery/noShorthandPropertyOverrides"
2267
2399
  | "lint/nursery/noSubstr"
2268
- | "lint/nursery/noTypeOnlyImportAttributes"
2269
2400
  | "lint/nursery/noUndeclaredDependencies"
2270
2401
  | "lint/nursery/noUnknownFunction"
2271
2402
  | "lint/nursery/noUnknownMediaFeatureName"
@@ -2277,10 +2408,12 @@ type Category =
2277
2408
  | "lint/nursery/noUnusedFunctionParameters"
2278
2409
  | "lint/nursery/noUselessStringConcat"
2279
2410
  | "lint/nursery/noUselessUndefinedInitialization"
2411
+ | "lint/nursery/noValueAtRule"
2280
2412
  | "lint/nursery/noYodaExpression"
2281
2413
  | "lint/nursery/useAdjacentOverloadSignatures"
2282
2414
  | "lint/nursery/useBiomeSuppressionComment"
2283
2415
  | "lint/nursery/useConsistentBuiltinInstantiation"
2416
+ | "lint/nursery/useConsistentCurlyBraces"
2284
2417
  | "lint/nursery/useConsistentGridAreas"
2285
2418
  | "lint/nursery/useDateNow"
2286
2419
  | "lint/nursery/useDefaultSwitchClause"
@@ -2291,12 +2424,15 @@ type Category =
2291
2424
  | "lint/nursery/useGenericFontNames"
2292
2425
  | "lint/nursery/useImportExtensions"
2293
2426
  | "lint/nursery/useImportRestrictions"
2427
+ | "lint/nursery/useJsxCurlyBraceConvention"
2294
2428
  | "lint/nursery/useNumberToFixedDigitsArgument"
2295
2429
  | "lint/nursery/useSemanticElements"
2296
2430
  | "lint/nursery/useSortedClasses"
2431
+ | "lint/nursery/useStrictMode"
2297
2432
  | "lint/nursery/useThrowNewError"
2298
2433
  | "lint/nursery/useThrowOnlyError"
2299
2434
  | "lint/nursery/useTopLevelRegex"
2435
+ | "lint/nursery/useTrimStartEnd"
2300
2436
  | "lint/nursery/useValidAutocomplete"
2301
2437
  | "lint/performance/noAccumulatingSpread"
2302
2438
  | "lint/performance/noBarrelFile"
@@ -2404,6 +2540,10 @@ type Category =
2404
2540
  | "lint/suspicious/useNamespaceKeyword"
2405
2541
  | "lint/suspicious/useValidTypeof"
2406
2542
  | "assists/nursery/useSortedKeys"
2543
+ | "syntax/nursery/noTypeOnlyImportAttributes"
2544
+ | "syntax/correctness/noSuperWithoutExtends"
2545
+ | "syntax/correctness/noInitializerWithDefinite"
2546
+ | "syntax/correctness/noDuplicatePrivateClassMembers"
2407
2547
  | "files/missingHandler"
2408
2548
  | "format"
2409
2549
  | "check"
@@ -2418,9 +2558,6 @@ type Category =
2418
2558
  | "internalError/fs"
2419
2559
  | "internalError/panic"
2420
2560
  | "parse"
2421
- | "parse/noSuperWithoutExtends"
2422
- | "parse/noInitializerWithDefinite"
2423
- | "parse/noDuplicatePrivateClassMembers"
2424
2561
  | "lint"
2425
2562
  | "lint/a11y"
2426
2563
  | "lint/complexity"
@@ -2565,8 +2702,10 @@ interface FormatOnTypeParams {
2565
2702
  }
2566
2703
  interface FixFileParams {
2567
2704
  fix_file_mode: FixFileMode;
2705
+ only: RuleCode[];
2568
2706
  path: BiomePath;
2569
2707
  should_format: boolean;
2708
+ skip: RuleCode[];
2570
2709
  }
2571
2710
  type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes";
2572
2711
  interface FixFileResult {
package/biome_wasm.js CHANGED
@@ -9,6 +9,20 @@ heap.push(undefined, null, true, false);
9
9
 
10
10
  function getObject(idx) { return heap[idx]; }
11
11
 
12
+ let heap_next = heap.length;
13
+
14
+ function dropObject(idx) {
15
+ if (idx < 132) return;
16
+ heap[idx] = heap_next;
17
+ heap_next = idx;
18
+ }
19
+
20
+ function takeObject(idx) {
21
+ const ret = getObject(idx);
22
+ dropObject(idx);
23
+ return ret;
24
+ }
25
+
12
26
  function isLikeNone(x) {
13
27
  return x === undefined || x === null;
14
28
  }
@@ -96,20 +110,6 @@ function passStringToWasm0(arg, malloc, realloc) {
96
110
  return ptr;
97
111
  }
98
112
 
99
- let heap_next = heap.length;
100
-
101
- function dropObject(idx) {
102
- if (idx < 132) return;
103
- heap[idx] = heap_next;
104
- heap_next = idx;
105
- }
106
-
107
- function takeObject(idx) {
108
- const ret = getObject(idx);
109
- dropObject(idx);
110
- return ret;
111
- }
112
-
113
113
  function addHeapObject(obj) {
114
114
  if (heap_next === heap.length) heap.push(heap.length + 1);
115
115
  const idx = heap_next;
@@ -694,6 +694,20 @@ class Workspace {
694
694
  }
695
695
  module.exports.Workspace = Workspace;
696
696
 
697
+ module.exports.__wbindgen_is_undefined = function(arg0) {
698
+ const ret = getObject(arg0) === undefined;
699
+ return ret;
700
+ };
701
+
702
+ module.exports.__wbindgen_in = function(arg0, arg1) {
703
+ const ret = getObject(arg0) in getObject(arg1);
704
+ return ret;
705
+ };
706
+
707
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
708
+ takeObject(arg0);
709
+ };
710
+
697
711
  module.exports.__wbindgen_boolean_get = function(arg0) {
698
712
  const v = getObject(arg0);
699
713
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
@@ -727,15 +741,6 @@ module.exports.__wbindgen_is_object = function(arg0) {
727
741
  return ret;
728
742
  };
729
743
 
730
- module.exports.__wbindgen_in = function(arg0, arg1) {
731
- const ret = getObject(arg0) in getObject(arg1);
732
- return ret;
733
- };
734
-
735
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
736
- takeObject(arg0);
737
- };
738
-
739
744
  module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
740
745
  const ret = arg0;
741
746
  return addHeapObject(ret);
@@ -761,11 +766,6 @@ module.exports.__wbindgen_is_string = function(arg0) {
761
766
  return ret;
762
767
  };
763
768
 
764
- module.exports.__wbindgen_is_undefined = function(arg0) {
765
- const ret = getObject(arg0) === undefined;
766
- return ret;
767
- };
768
-
769
769
  module.exports.__wbindgen_as_number = function(arg0) {
770
770
  const ret = +getObject(arg0);
771
771
  return ret;
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Biome Developers and Contributors"
5
5
  ],
6
6
  "description": "WebAssembly bindings to the Biome workspace API",
7
- "version": "1.8.3",
7
+ "version": "1.8.4-nightly.bd1d0c6",
8
8
  "license": "MIT OR Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",