@biomejs/wasm-web 1.3.3 → 1.4.0

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
@@ -109,6 +109,10 @@ interface FormatterConfiguration {
109
109
  * The size of the indentation, 2 by default
110
110
  */
111
111
  indentWidth?: number;
112
+ /**
113
+ * The type of line ending.
114
+ */
115
+ lineEnding?: LineEnding;
112
116
  /**
113
117
  * What's the max width of a line. Defaults to 80.
114
118
  */
@@ -195,12 +199,21 @@ If Biome can't find the configuration, it will attempt to use the current workin
195
199
  useIgnoreFile?: boolean;
196
200
  }
197
201
  type PlainIndentStyle = "tab" | "space";
202
+ type LineEnding = "lf" | "crlf" | "cr";
198
203
  type LineWidth = number;
199
204
  interface JavascriptFormatter {
200
205
  /**
201
206
  * Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
202
207
  */
203
208
  arrowParentheses?: ArrowParentheses;
209
+ /**
210
+ * 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.
211
+ */
212
+ bracketSameLine?: boolean;
213
+ /**
214
+ * Whether to insert spaces around brackets in object literals. Defaults to true.
215
+ */
216
+ bracketSpacing?: boolean;
204
217
  /**
205
218
  * Control the formatter for JavaScript (and its super languages) files.
206
219
  */
@@ -222,7 +235,11 @@ interface JavascriptFormatter {
222
235
  */
223
236
  jsxQuoteStyle?: QuoteStyle;
224
237
  /**
225
- * What's the max width of a line, applied to JavaScript (and its super languages) files. Defaults to 80.
238
+ * The type of line ending applied to JavaScript (and its super languages) files.
239
+ */
240
+ lineEnding?: LineEnding;
241
+ /**
242
+ * What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80.
226
243
  */
227
244
  lineWidth?: LineWidth;
228
245
  /**
@@ -269,7 +286,11 @@ interface JsonFormatter {
269
286
  */
270
287
  indentWidth?: number;
271
288
  /**
272
- * What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.
289
+ * The type of line ending applied to JSON (and its super languages) files.
290
+ */
291
+ lineEnding?: LineEnding;
292
+ /**
293
+ * What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.
273
294
  */
274
295
  lineWidth?: LineWidth;
275
296
  }
@@ -366,6 +387,10 @@ interface A11y {
366
387
  * The scope prop should be used only on <th> elements.
367
388
  */
368
389
  noHeaderScope?: RuleConfiguration;
390
+ /**
391
+ * Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
392
+ */
393
+ noInteractiveElementToNoninteractiveRole?: RuleConfiguration;
369
394
  /**
370
395
  * Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
371
396
  */
@@ -402,6 +427,10 @@ interface A11y {
402
427
  * Enforce that anchors have content and that the content is accessible to screen readers.
403
428
  */
404
429
  useAnchorContent?: RuleConfiguration;
430
+ /**
431
+ * Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
432
+ */
433
+ useAriaActivedescendantWithTabindex?: RuleConfiguration;
405
434
  /**
406
435
  * Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
407
436
  */
@@ -480,6 +509,10 @@ interface Complexity {
480
509
  * This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
481
510
  */
482
511
  noStaticOnlyClass?: RuleConfiguration;
512
+ /**
513
+ * Disallow this and super in static contexts.
514
+ */
515
+ noThisInStatic?: RuleConfiguration;
483
516
  /**
484
517
  * Disallow unnecessary catch clauses.
485
518
  */
@@ -528,6 +561,10 @@ interface Complexity {
528
561
  * It enables the recommended rules for this group
529
562
  */
530
563
  recommended?: boolean;
564
+ /**
565
+ * Use arrow functions over function expressions.
566
+ */
567
+ useArrowFunction?: RuleConfiguration;
531
568
  /**
532
569
  * Promotes the use of .flatMap() when map().flat() are used together.
533
570
  */
@@ -570,6 +607,10 @@ interface Correctness {
570
607
  * Disallow returning a value from a constructor.
571
608
  */
572
609
  noConstructorReturn?: RuleConfiguration;
610
+ /**
611
+ * Disallow empty character classes in regular expression literals.
612
+ */
613
+ noEmptyCharacterClassInRegex?: RuleConfiguration;
573
614
  /**
574
615
  * Disallows empty destructuring patterns.
575
616
  */
@@ -586,6 +627,10 @@ interface Correctness {
586
627
  * Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.
587
628
  */
588
629
  noInvalidConstructorSuper?: RuleConfiguration;
630
+ /**
631
+ * Disallow new operators with global non-constructor functions.
632
+ */
633
+ noInvalidNewBuiltin?: RuleConfiguration;
589
634
  /**
590
635
  * Disallow new operators with the Symbol object.
591
636
  */
@@ -689,9 +734,13 @@ interface Nursery {
689
734
  */
690
735
  all?: boolean;
691
736
  /**
692
- * Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type.
737
+ * Enforce that aria-hidden="true" is not set on focusable elements.
693
738
  */
694
- noApproximativeNumericConstant?: RuleConfiguration;
739
+ noAriaHiddenOnFocusable?: RuleConfiguration;
740
+ /**
741
+ * Disallow default exports.
742
+ */
743
+ noDefaultExport?: RuleConfiguration;
695
744
  /**
696
745
  * Disallow two keys with the same name inside a JSON object.
697
746
  */
@@ -701,37 +750,17 @@ interface Nursery {
701
750
  */
702
751
  noEmptyBlockStatements?: RuleConfiguration;
703
752
  /**
704
- * Disallow empty character classes in regular expression literals.
705
- */
706
- noEmptyCharacterClassInRegex?: RuleConfiguration;
707
- /**
708
- * Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
709
- */
710
- noInteractiveElementToNoninteractiveRole?: RuleConfiguration;
711
- /**
712
- * Disallow new operators with global non-constructor functions.
713
- */
714
- noInvalidNewBuiltin?: RuleConfiguration;
715
- /**
716
- * Enforce proper usage of new and constructor.
717
- */
718
- noMisleadingInstantiator?: RuleConfiguration;
719
- /**
720
- * Disallow shorthand assign when variable appears on both sides.
753
+ * Disallow use of implicit any type on variable declarations.
721
754
  */
722
- noMisrefactoredShorthandAssign?: RuleConfiguration;
723
- /**
724
- * Disallow this and super in static contexts.
725
- */
726
- noThisInStatic?: RuleConfiguration;
755
+ noImplicitAnyLet?: RuleConfiguration;
727
756
  /**
728
757
  * Disallow unused imports.
729
758
  */
730
759
  noUnusedImports?: RuleConfiguration;
731
760
  /**
732
- * Disallow else block when the if block breaks early.
761
+ * Disallow unused private class members
733
762
  */
734
- noUselessElse?: RuleConfiguration;
763
+ noUnusedPrivateClassMembers?: RuleConfiguration;
735
764
  /**
736
765
  * Disallow unnecessary nested block statements.
737
766
  */
@@ -741,17 +770,9 @@ interface Nursery {
741
770
  */
742
771
  recommended?: boolean;
743
772
  /**
744
- * Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
745
- */
746
- useAriaActivedescendantWithTabindex?: RuleConfiguration;
747
- /**
748
- * Use arrow functions over function expressions.
773
+ * Ensure async functions utilize await.
749
774
  */
750
- useArrowFunction?: RuleConfiguration;
751
- /**
752
- * Enforce the use of as const over literal type and type annotation.
753
- */
754
- useAsConstAssertion?: RuleConfiguration;
775
+ useAwait?: RuleConfiguration;
755
776
  /**
756
777
  * Enforce the use of import type when an import only has specifiers with type qualifier.
757
778
  */
@@ -761,9 +782,13 @@ interface Nursery {
761
782
  */
762
783
  useImportRestrictions?: RuleConfiguration;
763
784
  /**
764
- * Require assignment operator shorthand where possible.
785
+ * Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
765
786
  */
766
- useShorthandAssign?: RuleConfiguration;
787
+ useRegexLiterals?: RuleConfiguration;
788
+ /**
789
+ * Elements with ARIA roles must use a valid, non-abstract ARIA role.
790
+ */
791
+ useValidAriaRole?: RuleConfiguration;
767
792
  }
768
793
  interface Performance {
769
794
  /**
@@ -854,6 +879,10 @@ interface Style {
854
879
  * Disallow template literals if interpolation and special-character handling are not needed
855
880
  */
856
881
  noUnusedTemplateLiteral?: RuleConfiguration;
882
+ /**
883
+ * Disallow else block when the if block breaks early.
884
+ */
885
+ noUselessElse?: RuleConfiguration;
857
886
  /**
858
887
  * Disallow the use of var
859
888
  */
@@ -862,6 +891,10 @@ interface Style {
862
891
  * It enables the recommended rules for this group
863
892
  */
864
893
  recommended?: boolean;
894
+ /**
895
+ * Enforce the use of as const over literal type and type annotation.
896
+ */
897
+ useAsConstAssertion?: RuleConfiguration;
865
898
  /**
866
899
  * Requires following curly brace conventions.
867
900
  */
@@ -910,6 +943,10 @@ interface Style {
910
943
  * When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.
911
944
  */
912
945
  useShorthandArrayType?: RuleConfiguration;
946
+ /**
947
+ * Require assignment operator shorthand where possible.
948
+ */
949
+ useShorthandAssign?: RuleConfiguration;
913
950
  /**
914
951
  * Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.
915
952
  */
@@ -932,6 +969,10 @@ interface Suspicious {
932
969
  * It enables ALL rules for this group.
933
970
  */
934
971
  all?: boolean;
972
+ /**
973
+ * Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type.
974
+ */
975
+ noApproximativeNumericConstant?: RuleConfiguration;
935
976
  /**
936
977
  * Discourage the usage of Array index in keys.
937
978
  */
@@ -1044,6 +1085,14 @@ interface Suspicious {
1044
1085
  * Disallow labels that share a name with a variable
1045
1086
  */
1046
1087
  noLabelVar?: RuleConfiguration;
1088
+ /**
1089
+ * Enforce proper usage of new and constructor.
1090
+ */
1091
+ noMisleadingInstantiator?: RuleConfiguration;
1092
+ /**
1093
+ * Disallow shorthand assign when variable appears on both sides.
1094
+ */
1095
+ noMisrefactoredShorthandAssign?: RuleConfiguration;
1047
1096
  /**
1048
1097
  * Disallow direct use of Object.prototype builtins.
1049
1098
  */
@@ -1119,6 +1168,10 @@ interface OverrideFormatterConfiguration {
1119
1168
  * The size of the indentation, 2 by default
1120
1169
  */
1121
1170
  indentWidth?: number;
1171
+ /**
1172
+ * The type of line ending.
1173
+ */
1174
+ lineEnding?: LineEnding;
1122
1175
  /**
1123
1176
  * What's the max width of a line. Defaults to 80.
1124
1177
  */
@@ -1150,7 +1203,8 @@ type PossibleOptions =
1150
1203
  | ComplexityOptions
1151
1204
  | HooksOptions
1152
1205
  | NamingConventionOptions
1153
- | RestrictedGlobalsOptions;
1206
+ | RestrictedGlobalsOptions
1207
+ | ValidAriaRoleOptions;
1154
1208
  interface ComplexityOptions {
1155
1209
  /**
1156
1210
  * The maximum complexity score that we allow. Anything higher is considered excessive.
@@ -1179,6 +1233,10 @@ interface RestrictedGlobalsOptions {
1179
1233
  */
1180
1234
  deniedGlobals?: string[];
1181
1235
  }
1236
+ interface ValidAriaRoleOptions {
1237
+ allowedInvalidRoles: string[];
1238
+ ignoreNonDom: boolean;
1239
+ }
1182
1240
  interface Hooks {
1183
1241
  /**
1184
1242
  * The "position" of the closure function, starting from zero.
@@ -1196,6 +1254,10 @@ interface Hooks {
1196
1254
  name: string;
1197
1255
  }
1198
1256
  type EnumMemberCase = "PascalCase" | "CONSTANT_CASE" | "camelCase";
1257
+ interface ProjectFeaturesParams {
1258
+ manifest_path: RomePath;
1259
+ }
1260
+ interface ProjectFeaturesResult {}
1199
1261
  interface OpenFileParams {
1200
1262
  content: string;
1201
1263
  language_hint?: Language;
@@ -1275,6 +1337,7 @@ type Category =
1275
1337
  | "lint/a11y/noBlankTarget"
1276
1338
  | "lint/a11y/noDistractingElements"
1277
1339
  | "lint/a11y/noHeaderScope"
1340
+ | "lint/a11y/noInteractiveElementToNoninteractiveRole"
1278
1341
  | "lint/a11y/noNoninteractiveElementToInteractiveRole"
1279
1342
  | "lint/a11y/noNoninteractiveTabindex"
1280
1343
  | "lint/a11y/noPositiveTabindex"
@@ -1283,6 +1346,7 @@ type Category =
1283
1346
  | "lint/a11y/noSvgWithoutTitle"
1284
1347
  | "lint/a11y/useAltText"
1285
1348
  | "lint/a11y/useAnchorContent"
1349
+ | "lint/a11y/useAriaActivedescendantWithTabindex"
1286
1350
  | "lint/a11y/useAriaPropsForRole"
1287
1351
  | "lint/a11y/useButtonType"
1288
1352
  | "lint/a11y/useHeadingContent"
@@ -1301,6 +1365,7 @@ type Category =
1301
1365
  | "lint/complexity/noForEach"
1302
1366
  | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
1303
1367
  | "lint/complexity/noStaticOnlyClass"
1368
+ | "lint/complexity/noThisInStatic"
1304
1369
  | "lint/complexity/noUselessCatch"
1305
1370
  | "lint/complexity/noUselessConstructor"
1306
1371
  | "lint/complexity/noUselessEmptyExport"
@@ -1312,6 +1377,7 @@ type Category =
1312
1377
  | "lint/complexity/noUselessTypeConstraint"
1313
1378
  | "lint/complexity/noVoid"
1314
1379
  | "lint/complexity/noWith"
1380
+ | "lint/complexity/useArrowFunction"
1315
1381
  | "lint/complexity/useFlatMap"
1316
1382
  | "lint/complexity/useLiteralKeys"
1317
1383
  | "lint/complexity/useOptionalChain"
@@ -1321,10 +1387,12 @@ type Category =
1321
1387
  | "lint/correctness/noConstAssign"
1322
1388
  | "lint/correctness/noConstantCondition"
1323
1389
  | "lint/correctness/noConstructorReturn"
1390
+ | "lint/correctness/noEmptyCharacterClassInRegex"
1324
1391
  | "lint/correctness/noEmptyPattern"
1325
1392
  | "lint/correctness/noGlobalObjectCalls"
1326
1393
  | "lint/correctness/noInnerDeclarations"
1327
1394
  | "lint/correctness/noInvalidConstructorSuper"
1395
+ | "lint/correctness/noInvalidNewBuiltin"
1328
1396
  | "lint/correctness/noNewSymbol"
1329
1397
  | "lint/correctness/noNonoctalDecimalEscape"
1330
1398
  | "lint/correctness/noPrecisionLoss"
@@ -1349,24 +1417,20 @@ type Category =
1349
1417
  | "lint/correctness/useValidForDirection"
1350
1418
  | "lint/correctness/useYield"
1351
1419
  | "lint/nursery/noApproximativeNumericConstant"
1420
+ | "lint/nursery/noAriaHiddenOnFocusable"
1421
+ | "lint/nursery/noDefaultExport"
1352
1422
  | "lint/nursery/noDuplicateJsonKeys"
1353
1423
  | "lint/nursery/noEmptyBlockStatements"
1354
- | "lint/nursery/noEmptyCharacterClassInRegex"
1355
- | "lint/nursery/noInteractiveElementToNoninteractiveRole"
1356
- | "lint/nursery/noInvalidNewBuiltin"
1357
- | "lint/nursery/noMisleadingInstantiator"
1358
- | "lint/nursery/noMisrefactoredShorthandAssign"
1359
- | "lint/nursery/noThisInStatic"
1424
+ | "lint/nursery/noImplicitAnyLet"
1360
1425
  | "lint/nursery/noUnusedImports"
1361
- | "lint/nursery/noUselessElse"
1426
+ | "lint/nursery/noUnusedPrivateClassMembers"
1362
1427
  | "lint/nursery/noUselessLoneBlockStatements"
1363
- | "lint/nursery/useAriaActivedescendantWithTabindex"
1364
- | "lint/nursery/useArrowFunction"
1365
- | "lint/nursery/useAsConstAssertion"
1428
+ | "lint/nursery/useAwait"
1366
1429
  | "lint/nursery/useBiomeSuppressionComment"
1367
1430
  | "lint/nursery/useGroupedTypeImport"
1368
1431
  | "lint/nursery/useImportRestrictions"
1369
- | "lint/nursery/useShorthandAssign"
1432
+ | "lint/nursery/useRegexLiterals"
1433
+ | "lint/nursery/useValidAriaRole"
1370
1434
  | "lint/performance/noAccumulatingSpread"
1371
1435
  | "lint/performance/noDelete"
1372
1436
  | "lint/security/noDangerouslySetInnerHtml"
@@ -1383,7 +1447,9 @@ type Category =
1383
1447
  | "lint/style/noRestrictedGlobals"
1384
1448
  | "lint/style/noShoutyConstants"
1385
1449
  | "lint/style/noUnusedTemplateLiteral"
1450
+ | "lint/style/noUselessElse"
1386
1451
  | "lint/style/noVar"
1452
+ | "lint/style/useAsConstAssertion"
1387
1453
  | "lint/style/useBlockStatements"
1388
1454
  | "lint/style/useCollapsedElseIf"
1389
1455
  | "lint/style/useConst"
@@ -1396,10 +1462,12 @@ type Category =
1396
1462
  | "lint/style/useNumericLiterals"
1397
1463
  | "lint/style/useSelfClosingElements"
1398
1464
  | "lint/style/useShorthandArrayType"
1465
+ | "lint/style/useShorthandAssign"
1399
1466
  | "lint/style/useSingleCaseStatement"
1400
1467
  | "lint/style/useSingleVarDeclarator"
1401
1468
  | "lint/style/useTemplate"
1402
1469
  | "lint/style/useWhile"
1470
+ | "lint/suspicious/noApproximativeNumericConstant"
1403
1471
  | "lint/suspicious/noArrayIndexKey"
1404
1472
  | "lint/suspicious/noAssignInExpressions"
1405
1473
  | "lint/suspicious/noAsyncPromiseExecutor"
@@ -1428,6 +1496,8 @@ type Category =
1428
1496
  | "lint/suspicious/noGlobalIsNan"
1429
1497
  | "lint/suspicious/noImportAssign"
1430
1498
  | "lint/suspicious/noLabelVar"
1499
+ | "lint/suspicious/noMisleadingInstantiator"
1500
+ | "lint/suspicious/noMisrefactoredShorthandAssign"
1431
1501
  | "lint/suspicious/noPrototypeBuiltins"
1432
1502
  | "lint/suspicious/noRedeclare"
1433
1503
  | "lint/suspicious/noRedundantUseStrict"
@@ -1449,11 +1519,13 @@ type Category =
1449
1519
  | "organizeImports"
1450
1520
  | "migrate"
1451
1521
  | "deserialize"
1522
+ | "project"
1452
1523
  | "internalError/io"
1453
1524
  | "internalError/fs"
1454
1525
  | "internalError/panic"
1455
1526
  | "parse"
1456
1527
  | "parse/noSuperWithoutExtends"
1528
+ | "parse/noInitializerWithDefinite"
1457
1529
  | "parse/noDuplicatePrivateClassMembers"
1458
1530
  | "lint"
1459
1531
  | "lint/a11y"
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.3.3","license":"MIT","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.4.0","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"]}