@biomejs/wasm-nodejs 1.3.3 → 1.4.1-nightly.570d680

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,57 +750,45 @@ 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;
755
+ noImplicitAnyLet?: RuleConfiguration;
723
756
  /**
724
- * Disallow this and super in static contexts.
757
+ * Disallow characters made with multiple code points in character class syntax.
725
758
  */
726
- noThisInStatic?: RuleConfiguration;
759
+ noMisleadingCharacterClass?: RuleConfiguration;
727
760
  /**
728
761
  * Disallow unused imports.
729
762
  */
730
763
  noUnusedImports?: RuleConfiguration;
731
764
  /**
732
- * Disallow else block when the if block breaks early.
765
+ * Disallow unused private class members
733
766
  */
734
- noUselessElse?: RuleConfiguration;
767
+ noUnusedPrivateClassMembers?: RuleConfiguration;
735
768
  /**
736
769
  * Disallow unnecessary nested block statements.
737
770
  */
738
771
  noUselessLoneBlockStatements?: RuleConfiguration;
772
+ /**
773
+ * Disallow ternary operators when simpler alternatives exist.
774
+ */
775
+ noUselessTernary?: RuleConfiguration;
739
776
  /**
740
777
  * It enables the recommended rules for this group
741
778
  */
742
779
  recommended?: boolean;
743
780
  /**
744
- * Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
781
+ * Ensure async functions utilize await.
745
782
  */
746
- useAriaActivedescendantWithTabindex?: RuleConfiguration;
783
+ useAwait?: RuleConfiguration;
747
784
  /**
748
- * Use arrow functions over function expressions.
785
+ * Promotes the use of export type for types.
749
786
  */
750
- useArrowFunction?: RuleConfiguration;
787
+ useExportType?: RuleConfiguration;
751
788
  /**
752
- * Enforce the use of as const over literal type and type annotation.
789
+ * This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
753
790
  */
754
- useAsConstAssertion?: RuleConfiguration;
791
+ useForOf?: RuleConfiguration;
755
792
  /**
756
793
  * Enforce the use of import type when an import only has specifiers with type qualifier.
757
794
  */
@@ -761,9 +798,17 @@ interface Nursery {
761
798
  */
762
799
  useImportRestrictions?: RuleConfiguration;
763
800
  /**
764
- * Require assignment operator shorthand where possible.
801
+ * Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
765
802
  */
766
- useShorthandAssign?: RuleConfiguration;
803
+ useRegexLiterals?: RuleConfiguration;
804
+ /**
805
+ * Enforce using function types instead of object type with call signatures.
806
+ */
807
+ useShorthandFunctionType?: RuleConfiguration;
808
+ /**
809
+ * Elements with ARIA roles must use a valid, non-abstract ARIA role.
810
+ */
811
+ useValidAriaRole?: RuleConfiguration;
767
812
  }
768
813
  interface Performance {
769
814
  /**
@@ -854,6 +899,10 @@ interface Style {
854
899
  * Disallow template literals if interpolation and special-character handling are not needed
855
900
  */
856
901
  noUnusedTemplateLiteral?: RuleConfiguration;
902
+ /**
903
+ * Disallow else block when the if block breaks early.
904
+ */
905
+ noUselessElse?: RuleConfiguration;
857
906
  /**
858
907
  * Disallow the use of var
859
908
  */
@@ -862,6 +911,10 @@ interface Style {
862
911
  * It enables the recommended rules for this group
863
912
  */
864
913
  recommended?: boolean;
914
+ /**
915
+ * Enforce the use of as const over literal type and type annotation.
916
+ */
917
+ useAsConstAssertion?: RuleConfiguration;
865
918
  /**
866
919
  * Requires following curly brace conventions.
867
920
  */
@@ -910,6 +963,10 @@ interface Style {
910
963
  * When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.
911
964
  */
912
965
  useShorthandArrayType?: RuleConfiguration;
966
+ /**
967
+ * Require assignment operator shorthand where possible.
968
+ */
969
+ useShorthandAssign?: RuleConfiguration;
913
970
  /**
914
971
  * Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.
915
972
  */
@@ -932,6 +989,10 @@ interface Suspicious {
932
989
  * It enables ALL rules for this group.
933
990
  */
934
991
  all?: boolean;
992
+ /**
993
+ * 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.
994
+ */
995
+ noApproximativeNumericConstant?: RuleConfiguration;
935
996
  /**
936
997
  * Discourage the usage of Array index in keys.
937
998
  */
@@ -1044,6 +1105,14 @@ interface Suspicious {
1044
1105
  * Disallow labels that share a name with a variable
1045
1106
  */
1046
1107
  noLabelVar?: RuleConfiguration;
1108
+ /**
1109
+ * Enforce proper usage of new and constructor.
1110
+ */
1111
+ noMisleadingInstantiator?: RuleConfiguration;
1112
+ /**
1113
+ * Disallow shorthand assign when variable appears on both sides.
1114
+ */
1115
+ noMisrefactoredShorthandAssign?: RuleConfiguration;
1047
1116
  /**
1048
1117
  * Disallow direct use of Object.prototype builtins.
1049
1118
  */
@@ -1119,6 +1188,10 @@ interface OverrideFormatterConfiguration {
1119
1188
  * The size of the indentation, 2 by default
1120
1189
  */
1121
1190
  indentWidth?: number;
1191
+ /**
1192
+ * The type of line ending.
1193
+ */
1194
+ lineEnding?: LineEnding;
1122
1195
  /**
1123
1196
  * What's the max width of a line. Defaults to 80.
1124
1197
  */
@@ -1150,7 +1223,8 @@ type PossibleOptions =
1150
1223
  | ComplexityOptions
1151
1224
  | HooksOptions
1152
1225
  | NamingConventionOptions
1153
- | RestrictedGlobalsOptions;
1226
+ | RestrictedGlobalsOptions
1227
+ | ValidAriaRoleOptions;
1154
1228
  interface ComplexityOptions {
1155
1229
  /**
1156
1230
  * The maximum complexity score that we allow. Anything higher is considered excessive.
@@ -1179,6 +1253,10 @@ interface RestrictedGlobalsOptions {
1179
1253
  */
1180
1254
  deniedGlobals?: string[];
1181
1255
  }
1256
+ interface ValidAriaRoleOptions {
1257
+ allowedInvalidRoles: string[];
1258
+ ignoreNonDom: boolean;
1259
+ }
1182
1260
  interface Hooks {
1183
1261
  /**
1184
1262
  * The "position" of the closure function, starting from zero.
@@ -1196,6 +1274,10 @@ interface Hooks {
1196
1274
  name: string;
1197
1275
  }
1198
1276
  type EnumMemberCase = "PascalCase" | "CONSTANT_CASE" | "camelCase";
1277
+ interface ProjectFeaturesParams {
1278
+ manifest_path: RomePath;
1279
+ }
1280
+ interface ProjectFeaturesResult {}
1199
1281
  interface OpenFileParams {
1200
1282
  content: string;
1201
1283
  language_hint?: Language;
@@ -1275,6 +1357,7 @@ type Category =
1275
1357
  | "lint/a11y/noBlankTarget"
1276
1358
  | "lint/a11y/noDistractingElements"
1277
1359
  | "lint/a11y/noHeaderScope"
1360
+ | "lint/a11y/noInteractiveElementToNoninteractiveRole"
1278
1361
  | "lint/a11y/noNoninteractiveElementToInteractiveRole"
1279
1362
  | "lint/a11y/noNoninteractiveTabindex"
1280
1363
  | "lint/a11y/noPositiveTabindex"
@@ -1283,6 +1366,7 @@ type Category =
1283
1366
  | "lint/a11y/noSvgWithoutTitle"
1284
1367
  | "lint/a11y/useAltText"
1285
1368
  | "lint/a11y/useAnchorContent"
1369
+ | "lint/a11y/useAriaActivedescendantWithTabindex"
1286
1370
  | "lint/a11y/useAriaPropsForRole"
1287
1371
  | "lint/a11y/useButtonType"
1288
1372
  | "lint/a11y/useHeadingContent"
@@ -1301,6 +1385,7 @@ type Category =
1301
1385
  | "lint/complexity/noForEach"
1302
1386
  | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
1303
1387
  | "lint/complexity/noStaticOnlyClass"
1388
+ | "lint/complexity/noThisInStatic"
1304
1389
  | "lint/complexity/noUselessCatch"
1305
1390
  | "lint/complexity/noUselessConstructor"
1306
1391
  | "lint/complexity/noUselessEmptyExport"
@@ -1312,6 +1397,7 @@ type Category =
1312
1397
  | "lint/complexity/noUselessTypeConstraint"
1313
1398
  | "lint/complexity/noVoid"
1314
1399
  | "lint/complexity/noWith"
1400
+ | "lint/complexity/useArrowFunction"
1315
1401
  | "lint/complexity/useFlatMap"
1316
1402
  | "lint/complexity/useLiteralKeys"
1317
1403
  | "lint/complexity/useOptionalChain"
@@ -1321,10 +1407,12 @@ type Category =
1321
1407
  | "lint/correctness/noConstAssign"
1322
1408
  | "lint/correctness/noConstantCondition"
1323
1409
  | "lint/correctness/noConstructorReturn"
1410
+ | "lint/correctness/noEmptyCharacterClassInRegex"
1324
1411
  | "lint/correctness/noEmptyPattern"
1325
1412
  | "lint/correctness/noGlobalObjectCalls"
1326
1413
  | "lint/correctness/noInnerDeclarations"
1327
1414
  | "lint/correctness/noInvalidConstructorSuper"
1415
+ | "lint/correctness/noInvalidNewBuiltin"
1328
1416
  | "lint/correctness/noNewSymbol"
1329
1417
  | "lint/correctness/noNonoctalDecimalEscape"
1330
1418
  | "lint/correctness/noPrecisionLoss"
@@ -1349,24 +1437,25 @@ type Category =
1349
1437
  | "lint/correctness/useValidForDirection"
1350
1438
  | "lint/correctness/useYield"
1351
1439
  | "lint/nursery/noApproximativeNumericConstant"
1440
+ | "lint/nursery/noAriaHiddenOnFocusable"
1441
+ | "lint/nursery/noDefaultExport"
1352
1442
  | "lint/nursery/noDuplicateJsonKeys"
1353
1443
  | "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"
1444
+ | "lint/nursery/noImplicitAnyLet"
1445
+ | "lint/nursery/noMisleadingCharacterClass"
1360
1446
  | "lint/nursery/noUnusedImports"
1361
- | "lint/nursery/noUselessElse"
1447
+ | "lint/nursery/noUnusedPrivateClassMembers"
1362
1448
  | "lint/nursery/noUselessLoneBlockStatements"
1363
- | "lint/nursery/useAriaActivedescendantWithTabindex"
1364
- | "lint/nursery/useArrowFunction"
1365
- | "lint/nursery/useAsConstAssertion"
1449
+ | "lint/nursery/noUselessTernary"
1450
+ | "lint/nursery/useAwait"
1366
1451
  | "lint/nursery/useBiomeSuppressionComment"
1452
+ | "lint/nursery/useExportType"
1453
+ | "lint/nursery/useForOf"
1367
1454
  | "lint/nursery/useGroupedTypeImport"
1368
1455
  | "lint/nursery/useImportRestrictions"
1369
- | "lint/nursery/useShorthandAssign"
1456
+ | "lint/nursery/useRegexLiterals"
1457
+ | "lint/nursery/useShorthandFunctionType"
1458
+ | "lint/nursery/useValidAriaRole"
1370
1459
  | "lint/performance/noAccumulatingSpread"
1371
1460
  | "lint/performance/noDelete"
1372
1461
  | "lint/security/noDangerouslySetInnerHtml"
@@ -1383,7 +1472,9 @@ type Category =
1383
1472
  | "lint/style/noRestrictedGlobals"
1384
1473
  | "lint/style/noShoutyConstants"
1385
1474
  | "lint/style/noUnusedTemplateLiteral"
1475
+ | "lint/style/noUselessElse"
1386
1476
  | "lint/style/noVar"
1477
+ | "lint/style/useAsConstAssertion"
1387
1478
  | "lint/style/useBlockStatements"
1388
1479
  | "lint/style/useCollapsedElseIf"
1389
1480
  | "lint/style/useConst"
@@ -1396,10 +1487,12 @@ type Category =
1396
1487
  | "lint/style/useNumericLiterals"
1397
1488
  | "lint/style/useSelfClosingElements"
1398
1489
  | "lint/style/useShorthandArrayType"
1490
+ | "lint/style/useShorthandAssign"
1399
1491
  | "lint/style/useSingleCaseStatement"
1400
1492
  | "lint/style/useSingleVarDeclarator"
1401
1493
  | "lint/style/useTemplate"
1402
1494
  | "lint/style/useWhile"
1495
+ | "lint/suspicious/noApproximativeNumericConstant"
1403
1496
  | "lint/suspicious/noArrayIndexKey"
1404
1497
  | "lint/suspicious/noAssignInExpressions"
1405
1498
  | "lint/suspicious/noAsyncPromiseExecutor"
@@ -1428,6 +1521,8 @@ type Category =
1428
1521
  | "lint/suspicious/noGlobalIsNan"
1429
1522
  | "lint/suspicious/noImportAssign"
1430
1523
  | "lint/suspicious/noLabelVar"
1524
+ | "lint/suspicious/noMisleadingInstantiator"
1525
+ | "lint/suspicious/noMisrefactoredShorthandAssign"
1431
1526
  | "lint/suspicious/noPrototypeBuiltins"
1432
1527
  | "lint/suspicious/noRedeclare"
1433
1528
  | "lint/suspicious/noRedundantUseStrict"
@@ -1449,11 +1544,13 @@ type Category =
1449
1544
  | "organizeImports"
1450
1545
  | "migrate"
1451
1546
  | "deserialize"
1547
+ | "project"
1452
1548
  | "internalError/io"
1453
1549
  | "internalError/fs"
1454
1550
  | "internalError/panic"
1455
1551
  | "parse"
1456
1552
  | "parse/noSuperWithoutExtends"
1553
+ | "parse/noInitializerWithDefinite"
1457
1554
  | "parse/noDuplicatePrivateClassMembers"
1458
1555
  | "lint"
1459
1556
  | "lint/a11y"
Binary file
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/wasm-nodejs","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"],"main":"biome_wasm.js","homepage":"https://biomejs.dev/","types":"biome_wasm.d.ts","keywords":["parser","linter","formatter"]}
1
+ {"name":"@biomejs/wasm-nodejs","collaborators":["Biome Developers and Contributors"],"description":"WebAssembly bindings to the Biome workspace API","version":"1.4.1-nightly.570d680","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"],"main":"biome_wasm.js","homepage":"https://biomejs.dev/","types":"biome_wasm.d.ts","keywords":["parser","linter","formatter"]}