@biomejs/wasm-web 1.4.1 → 1.5.1

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
@@ -17,16 +17,24 @@ interface SupportsFeatureResult {
17
17
  type SupportKind =
18
18
  | "Supported"
19
19
  | "Ignored"
20
+ | "Protected"
20
21
  | "FeatureNotEnabled"
21
22
  | "FileNotSupported";
22
23
  interface UpdateSettingsParams {
23
24
  configuration: Configuration;
25
+ gitignore_matches: string[];
26
+ vcs_base_path?: string;
27
+ working_directory?: string;
24
28
  }
25
29
  interface Configuration {
26
30
  /**
27
31
  * A field for the [JSON schema](https://json-schema.org/) specification
28
32
  */
29
33
  $schema?: string;
34
+ /**
35
+ * Specific configuration for the Css language
36
+ */
37
+ css?: CssConfiguration;
30
38
  /**
31
39
  * A list of paths to other JSON files, used to extends the current configuration.
32
40
  */
@@ -64,6 +72,16 @@ interface Configuration {
64
72
  */
65
73
  vcs?: VcsConfiguration;
66
74
  }
75
+ interface CssConfiguration {
76
+ /**
77
+ * Formatting options
78
+ */
79
+ formatter?: CssFormatter;
80
+ /**
81
+ * Parsing options
82
+ */
83
+ parser?: CssParser;
84
+ }
67
85
  type StringSet = string[];
68
86
  interface FilesConfiguration {
69
87
  /**
@@ -183,6 +201,10 @@ interface VcsConfiguration {
183
201
  * The kind of client.
184
202
  */
185
203
  clientKind?: VcsClientKind;
204
+ /**
205
+ * The main branch of the project
206
+ */
207
+ defaultBranch?: string;
186
208
  /**
187
209
  * Whether Biome should integrate itself with the VCS client
188
210
  */
@@ -198,6 +220,39 @@ If Biome can't find the configuration, it will attempt to use the current workin
198
220
  */
199
221
  useIgnoreFile?: boolean;
200
222
  }
223
+ interface CssFormatter {
224
+ /**
225
+ * Control the formatter for CSS (and its super languages) files.
226
+ */
227
+ enabled?: boolean;
228
+ /**
229
+ * The size of the indentation applied to CSS (and its super languages) files. Default to 2.
230
+ */
231
+ indentSize?: number;
232
+ /**
233
+ * The indent style applied to CSS (and its super languages) files.
234
+ */
235
+ indentStyle?: PlainIndentStyle;
236
+ /**
237
+ * The size of the indentation applied to CSS (and its super languages) files. Default to 2.
238
+ */
239
+ indentWidth?: number;
240
+ /**
241
+ * The type of line ending applied to CSS (and its super languages) files.
242
+ */
243
+ lineEnding?: LineEnding;
244
+ /**
245
+ * What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.
246
+ */
247
+ lineWidth?: LineWidth;
248
+ quoteStyle?: QuoteStyle;
249
+ }
250
+ interface CssParser {
251
+ /**
252
+ * Allow comments to appear on incorrect lines in `.css` files
253
+ */
254
+ allowWrongLineComments?: boolean;
255
+ }
201
256
  type PlainIndentStyle = "tab" | "space";
202
257
  type LineEnding = "lf" | "crlf" | "cr";
203
258
  type LineWidth = number;
@@ -323,6 +378,10 @@ interface Rules {
323
378
  suspicious?: Suspicious;
324
379
  }
325
380
  interface OverridePattern {
381
+ /**
382
+ * Specific configuration for the Css language
383
+ */
384
+ css?: CssConfiguration;
326
385
  /**
327
386
  * Specific configuration for the Json language
328
387
  */
@@ -353,8 +412,8 @@ interface OverridePattern {
353
412
  organizeImports?: OverrideOrganizeImportsConfiguration;
354
413
  }
355
414
  type VcsClientKind = "git";
356
- type ArrowParentheses = "always" | "asNeeded";
357
415
  type QuoteStyle = "double" | "single";
416
+ type ArrowParentheses = "always" | "asNeeded";
358
417
  type QuoteProperties = "asNeeded" | "preserve";
359
418
  type Semicolons = "always" | "asNeeded";
360
419
  type TrailingComma = "all" | "es5" | "none";
@@ -367,6 +426,10 @@ interface A11y {
367
426
  * Enforce that the accessKey attribute is not used on any HTML element.
368
427
  */
369
428
  noAccessKey?: RuleConfiguration;
429
+ /**
430
+ * Enforce that aria-hidden="true" is not set on focusable elements.
431
+ */
432
+ noAriaHiddenOnFocusable?: RuleConfiguration;
370
433
  /**
371
434
  * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
372
435
  */
@@ -471,6 +534,10 @@ interface A11y {
471
534
  * Ensures that ARIA properties aria-* are all valid.
472
535
  */
473
536
  useValidAriaProps?: RuleConfiguration;
537
+ /**
538
+ * Elements with ARIA roles must use a valid, non-abstract ARIA role.
539
+ */
540
+ useValidAriaRole?: RuleConfiguration;
474
541
  /**
475
542
  * Enforce that ARIA state and property values are valid.
476
543
  */
@@ -577,6 +644,10 @@ interface Complexity {
577
644
  * Enforce using concise optional chain instead of chained logical expressions.
578
645
  */
579
646
  useOptionalChain?: RuleConfiguration;
647
+ /**
648
+ * Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
649
+ */
650
+ useRegexLiterals?: RuleConfiguration;
580
651
  /**
581
652
  * Disallow number literal object member names which are not base10 or uses underscore as separator
582
653
  */
@@ -733,14 +804,6 @@ interface Nursery {
733
804
  * It enables ALL rules for this group.
734
805
  */
735
806
  all?: boolean;
736
- /**
737
- * Enforce that aria-hidden="true" is not set on focusable elements.
738
- */
739
- noAriaHiddenOnFocusable?: RuleConfiguration;
740
- /**
741
- * Disallow default exports.
742
- */
743
- noDefaultExport?: RuleConfiguration;
744
807
  /**
745
808
  * Disallow two keys with the same name inside a JSON object.
746
809
  */
@@ -750,9 +813,33 @@ interface Nursery {
750
813
  */
751
814
  noEmptyBlockStatements?: RuleConfiguration;
752
815
  /**
753
- * Disallow use of implicit any type on variable declarations.
816
+ * Disallow empty type parameters in type aliases and interfaces.
754
817
  */
755
- noImplicitAnyLet?: RuleConfiguration;
818
+ noEmptyTypeParameters?: RuleConfiguration;
819
+ /**
820
+ * Disallow assignments to native objects and read-only global variables.
821
+ */
822
+ noGlobalAssign?: RuleConfiguration;
823
+ /**
824
+ * Disallow the use of global eval().
825
+ */
826
+ noGlobalEval?: RuleConfiguration;
827
+ /**
828
+ * Disallow the use of variables and function parameters before their declaration
829
+ */
830
+ noInvalidUseBeforeDeclaration?: RuleConfiguration;
831
+ /**
832
+ * Disallow characters made with multiple code points in character class syntax.
833
+ */
834
+ noMisleadingCharacterClass?: RuleConfiguration;
835
+ /**
836
+ * Forbid the use of Node.js builtin modules.
837
+ */
838
+ noNodejsModules?: RuleConfiguration;
839
+ /**
840
+ * Disallow then property.
841
+ */
842
+ noThenProperty?: RuleConfiguration;
756
843
  /**
757
844
  * Disallow unused imports.
758
845
  */
@@ -765,6 +852,10 @@ interface Nursery {
765
852
  * Disallow unnecessary nested block statements.
766
853
  */
767
854
  noUselessLoneBlockStatements?: RuleConfiguration;
855
+ /**
856
+ * Disallow ternary operators when simpler alternatives exist.
857
+ */
858
+ noUselessTernary?: RuleConfiguration;
768
859
  /**
769
860
  * It enables the recommended rules for this group
770
861
  */
@@ -773,6 +864,22 @@ interface Nursery {
773
864
  * Ensure async functions utilize await.
774
865
  */
775
866
  useAwait?: RuleConfiguration;
867
+ /**
868
+ * Require consistently using either T[] or Array<T>
869
+ */
870
+ useConsistentArrayType?: RuleConfiguration;
871
+ /**
872
+ * Promotes the use of export type for types.
873
+ */
874
+ useExportType?: RuleConfiguration;
875
+ /**
876
+ * Enforce naming conventions for JavaScript and TypeScript filenames.
877
+ */
878
+ useFilenamingConvention?: RuleConfiguration;
879
+ /**
880
+ * This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
881
+ */
882
+ useForOf?: RuleConfiguration;
776
883
  /**
777
884
  * Enforce the use of import type when an import only has specifiers with type qualifier.
778
885
  */
@@ -782,13 +889,21 @@ interface Nursery {
782
889
  */
783
890
  useImportRestrictions?: RuleConfiguration;
784
891
  /**
785
- * Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
892
+ * Promotes the use of import type for types.
786
893
  */
787
- useRegexLiterals?: RuleConfiguration;
894
+ useImportType?: RuleConfiguration;
788
895
  /**
789
- * Elements with ARIA roles must use a valid, non-abstract ARIA role.
896
+ * Enforces using the node: protocol for Node.js builtin modules.
790
897
  */
791
- useValidAriaRole?: RuleConfiguration;
898
+ useNodejsImportProtocol?: RuleConfiguration;
899
+ /**
900
+ * Use the Number properties instead of global ones.
901
+ */
902
+ useNumberNamespace?: RuleConfiguration;
903
+ /**
904
+ * Enforce using function types instead of object type with call signatures.
905
+ */
906
+ useShorthandFunctionType?: RuleConfiguration;
792
907
  }
793
908
  interface Performance {
794
909
  /**
@@ -839,6 +954,10 @@ interface Style {
839
954
  * Disallow comma operator.
840
955
  */
841
956
  noCommaOperator?: RuleConfiguration;
957
+ /**
958
+ * Disallow default exports.
959
+ */
960
+ noDefaultExport?: RuleConfiguration;
842
961
  /**
843
962
  * Disallow implicit true values on JSX boolean attributes
844
963
  */
@@ -1077,6 +1196,10 @@ interface Suspicious {
1077
1196
  * Use Number.isNaN instead of global isNaN.
1078
1197
  */
1079
1198
  noGlobalIsNan?: RuleConfiguration;
1199
+ /**
1200
+ * Disallow use of implicit any type on variable declarations.
1201
+ */
1202
+ noImplicitAnyLet?: RuleConfiguration;
1080
1203
  /**
1081
1204
  * Disallow assigning to imported bindings
1082
1205
  */
@@ -1201,7 +1324,10 @@ interface RuleWithOptions {
1201
1324
  }
1202
1325
  type PossibleOptions =
1203
1326
  | ComplexityOptions
1327
+ | ConsistentArrayTypeOptions
1328
+ | FilenamingConventionOptions
1204
1329
  | HooksOptions
1330
+ | DeprecatedHooksOptions
1205
1331
  | NamingConventionOptions
1206
1332
  | RestrictedGlobalsOptions
1207
1333
  | ValidAriaRoleOptions;
@@ -1211,12 +1337,26 @@ interface ComplexityOptions {
1211
1337
  */
1212
1338
  maxAllowedComplexity: number;
1213
1339
  }
1340
+ interface ConsistentArrayTypeOptions {
1341
+ syntax: ConsistentArrayType;
1342
+ }
1343
+ interface FilenamingConventionOptions {
1344
+ /**
1345
+ * Allowed cases for _TypeScript_ `enum` member names.
1346
+ */
1347
+ filenameCases: FilenameCases;
1348
+ /**
1349
+ * If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
1350
+ */
1351
+ strictCase: boolean;
1352
+ }
1214
1353
  interface HooksOptions {
1215
1354
  /**
1216
1355
  * List of safe hooks
1217
1356
  */
1218
1357
  hooks: Hooks[];
1219
1358
  }
1359
+ interface DeprecatedHooksOptions {}
1220
1360
  interface NamingConventionOptions {
1221
1361
  /**
1222
1362
  * Allowed cases for _TypeScript_ `enum` member names.
@@ -1237,6 +1377,8 @@ interface ValidAriaRoleOptions {
1237
1377
  allowedInvalidRoles: string[];
1238
1378
  ignoreNonDom: boolean;
1239
1379
  }
1380
+ type ConsistentArrayType = "shorthand" | "generic";
1381
+ type FilenameCases = FilenameCase[];
1240
1382
  interface Hooks {
1241
1383
  /**
1242
1384
  * The "position" of the closure function, starting from zero.
@@ -1254,6 +1396,12 @@ interface Hooks {
1254
1396
  name: string;
1255
1397
  }
1256
1398
  type EnumMemberCase = "PascalCase" | "CONSTANT_CASE" | "camelCase";
1399
+ type FilenameCase =
1400
+ | "camelCase"
1401
+ | "export"
1402
+ | "kebab-case"
1403
+ | "PascalCase"
1404
+ | "snake_case";
1257
1405
  interface ProjectFeaturesParams {
1258
1406
  manifest_path: RomePath;
1259
1407
  }
@@ -1271,6 +1419,7 @@ type Language =
1271
1419
  | "TypeScriptReact"
1272
1420
  | "Json"
1273
1421
  | "Jsonc"
1422
+ | "Css"
1274
1423
  | "Unknown";
1275
1424
  interface ChangeFileParams {
1276
1425
  content: string;
@@ -1332,6 +1481,7 @@ interface Advices {
1332
1481
  }
1333
1482
  type Category =
1334
1483
  | "lint/a11y/noAccessKey"
1484
+ | "lint/a11y/noAriaHiddenOnFocusable"
1335
1485
  | "lint/a11y/noAriaUnsupportedElements"
1336
1486
  | "lint/a11y/noAutofocus"
1337
1487
  | "lint/a11y/noBlankTarget"
@@ -1357,6 +1507,7 @@ type Category =
1357
1507
  | "lint/a11y/useMediaCaption"
1358
1508
  | "lint/a11y/useValidAnchor"
1359
1509
  | "lint/a11y/useValidAriaProps"
1510
+ | "lint/a11y/useValidAriaRole"
1360
1511
  | "lint/a11y/useValidAriaValues"
1361
1512
  | "lint/a11y/useValidLang"
1362
1513
  | "lint/complexity/noBannedTypes"
@@ -1381,6 +1532,7 @@ type Category =
1381
1532
  | "lint/complexity/useFlatMap"
1382
1533
  | "lint/complexity/useLiteralKeys"
1383
1534
  | "lint/complexity/useOptionalChain"
1535
+ | "lint/complexity/useRegexLiterals"
1384
1536
  | "lint/complexity/useSimpleNumberKeys"
1385
1537
  | "lint/complexity/useSimplifiedLogicExpression"
1386
1538
  | "lint/correctness/noChildrenProp"
@@ -1417,26 +1569,39 @@ type Category =
1417
1569
  | "lint/correctness/useValidForDirection"
1418
1570
  | "lint/correctness/useYield"
1419
1571
  | "lint/nursery/noApproximativeNumericConstant"
1420
- | "lint/nursery/noAriaHiddenOnFocusable"
1421
- | "lint/nursery/noDefaultExport"
1422
1572
  | "lint/nursery/noDuplicateJsonKeys"
1423
1573
  | "lint/nursery/noEmptyBlockStatements"
1424
- | "lint/nursery/noImplicitAnyLet"
1574
+ | "lint/nursery/noEmptyTypeParameters"
1575
+ | "lint/nursery/noGlobalAssign"
1576
+ | "lint/nursery/noGlobalEval"
1577
+ | "lint/nursery/noInvalidUseBeforeDeclaration"
1578
+ | "lint/nursery/noMisleadingCharacterClass"
1579
+ | "lint/nursery/noNodejsModules"
1580
+ | "lint/nursery/noThenProperty"
1581
+ | "lint/nursery/noTypeOnlyImportAttributes"
1425
1582
  | "lint/nursery/noUnusedImports"
1426
1583
  | "lint/nursery/noUnusedPrivateClassMembers"
1427
1584
  | "lint/nursery/noUselessLoneBlockStatements"
1585
+ | "lint/nursery/noUselessTernary"
1428
1586
  | "lint/nursery/useAwait"
1429
1587
  | "lint/nursery/useBiomeSuppressionComment"
1588
+ | "lint/nursery/useConsistentArrayType"
1589
+ | "lint/nursery/useExportType"
1590
+ | "lint/nursery/useFilenamingConvention"
1591
+ | "lint/nursery/useForOf"
1430
1592
  | "lint/nursery/useGroupedTypeImport"
1431
1593
  | "lint/nursery/useImportRestrictions"
1432
- | "lint/nursery/useRegexLiterals"
1433
- | "lint/nursery/useValidAriaRole"
1594
+ | "lint/nursery/useImportType"
1595
+ | "lint/nursery/useNodejsImportProtocol"
1596
+ | "lint/nursery/useNumberNamespace"
1597
+ | "lint/nursery/useShorthandFunctionType"
1434
1598
  | "lint/performance/noAccumulatingSpread"
1435
1599
  | "lint/performance/noDelete"
1436
1600
  | "lint/security/noDangerouslySetInnerHtml"
1437
1601
  | "lint/security/noDangerouslySetInnerHtmlWithChildren"
1438
1602
  | "lint/style/noArguments"
1439
1603
  | "lint/style/noCommaOperator"
1604
+ | "lint/style/noDefaultExport"
1440
1605
  | "lint/style/noImplicitBoolean"
1441
1606
  | "lint/style/noInferrableTypes"
1442
1607
  | "lint/style/noNamespace"
@@ -1494,6 +1659,7 @@ type Category =
1494
1659
  | "lint/suspicious/noFunctionAssign"
1495
1660
  | "lint/suspicious/noGlobalIsFinite"
1496
1661
  | "lint/suspicious/noGlobalIsNan"
1662
+ | "lint/suspicious/noImplicitAnyLet"
1497
1663
  | "lint/suspicious/noImportAssign"
1498
1664
  | "lint/suspicious/noLabelVar"
1499
1665
  | "lint/suspicious/noMisleadingInstantiator"
@@ -1570,7 +1736,8 @@ type DiagnosticTag =
1570
1736
  | "fixable"
1571
1737
  | "internal"
1572
1738
  | "unnecessaryCode"
1573
- | "deprecatedCode";
1739
+ | "deprecatedCode"
1740
+ | "verbose";
1574
1741
  type LogCategory = "None" | "Info" | "Warn" | "Error";
1575
1742
  interface TextEdit {
1576
1743
  dictionary: string;
package/biome_wasm.js CHANGED
@@ -29,6 +29,23 @@ function addHeapObject(obj) {
29
29
  return idx;
30
30
  }
31
31
 
32
+ const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
33
+
34
+ cachedTextDecoder.decode();
35
+
36
+ let cachedUint8Memory0 = null;
37
+
38
+ function getUint8Memory0() {
39
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
40
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
+ }
42
+ return cachedUint8Memory0;
43
+ }
44
+
45
+ function getStringFromWasm0(ptr, len) {
46
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
47
+ }
48
+
32
49
  function isLikeNone(x) {
33
50
  return x === undefined || x === null;
34
51
  }
@@ -53,15 +70,6 @@ function getInt32Memory0() {
53
70
 
54
71
  let WASM_VECTOR_LEN = 0;
55
72
 
56
- let cachedUint8Memory0 = null;
57
-
58
- function getUint8Memory0() {
59
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
60
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
61
- }
62
- return cachedUint8Memory0;
63
- }
64
-
65
73
  const cachedTextEncoder = new TextEncoder('utf-8');
66
74
 
67
75
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -115,14 +123,6 @@ function passStringToWasm0(arg, malloc, realloc) {
115
123
  return ptr;
116
124
  }
117
125
 
118
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
119
-
120
- cachedTextDecoder.decode();
121
-
122
- function getStringFromWasm0(ptr, len) {
123
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
124
- }
125
-
126
126
  let cachedBigInt64Memory0 = null;
127
127
 
128
128
  function getBigInt64Memory0() {
@@ -722,6 +722,10 @@ function getImports() {
722
722
  const ret = BigInt.asUintN(64, arg0);
723
723
  return addHeapObject(ret);
724
724
  };
725
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
726
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
727
+ return addHeapObject(ret);
728
+ };
725
729
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
726
730
  const obj = getObject(arg1);
727
731
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -745,10 +749,6 @@ function getImports() {
745
749
  const ret = typeof(getObject(arg0)) === 'string';
746
750
  return ret;
747
751
  };
748
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
749
- const ret = new Error(getStringFromWasm0(arg0, arg1));
750
- return addHeapObject(ret);
751
- };
752
752
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
753
753
  const ret = getObject(arg0);
754
754
  return addHeapObject(ret);
Binary file
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/wasm-web","collaborators":["Biome Developers and Contributors"],"description":"WebAssembly bindings to the Biome workspace API","version":"1.4.1","license":"MIT OR Apache-2.0","repository":{"type":"git","url":"https://github.com/biomejs/biome"},"files":["biome_wasm_bg.wasm","biome_wasm.js","biome_wasm.d.ts"],"module":"biome_wasm.js","homepage":"https://biomejs.dev/","types":"biome_wasm.d.ts","sideEffects":["./snippets/*"],"keywords":["parser","linter","formatter"]}
1
+ {"name":"@biomejs/wasm-web","collaborators":["Biome Developers and Contributors"],"description":"WebAssembly bindings to the Biome workspace API","version":"1.5.1","license":"MIT OR Apache-2.0","repository":{"type":"git","url":"https://github.com/biomejs/biome"},"files":["biome_wasm_bg.wasm","biome_wasm.js","biome_wasm.d.ts"],"module":"biome_wasm.js","homepage":"https://biomejs.dev/","types":"biome_wasm.d.ts","sideEffects":["./snippets/*"],"keywords":["parser","linter","formatter"]}