@biomejs/wasm-web 1.1.2 → 1.2.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.
@@ -116,6 +116,10 @@ If defined here, they should not emit diagnostics.
116
116
  parser?: JavascriptParser;
117
117
  }
118
118
  interface JsonConfiguration {
119
+ /**
120
+ * Formatting options
121
+ */
122
+ formatter?: JsonFormatter;
119
123
  /**
120
124
  * Parsing options
121
125
  */
@@ -172,10 +176,26 @@ interface JavascriptFormatter {
172
176
  * Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
173
177
  */
174
178
  arrowParentheses?: ArrowParentheses;
179
+ /**
180
+ * Control the formatter for JavaScript (and its super languages) files.
181
+ */
182
+ enabled?: boolean;
183
+ /**
184
+ * The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.
185
+ */
186
+ indentSize?: number;
187
+ /**
188
+ * The indent style applied to JavaScript (and its super languages) files.
189
+ */
190
+ indentStyle?: PlainIndentStyle;
175
191
  /**
176
192
  * The type of quotes used in JSX. Defaults to double.
177
193
  */
178
194
  jsxQuoteStyle?: QuoteStyle;
195
+ /**
196
+ * What's the max width of a line, applied to JavaScript (and its super languages) files. Defaults to 80.
197
+ */
198
+ lineWidth?: LineWidth;
179
199
  /**
180
200
  * When properties in objects are quoted. Defaults to asNeeded.
181
201
  */
@@ -202,6 +222,24 @@ These decorators belong to an old proposal, and they are subject to change.
202
222
  */
203
223
  unsafeParameterDecoratorsEnabled?: boolean;
204
224
  }
225
+ interface JsonFormatter {
226
+ /**
227
+ * Control the formatter for JSON (and its super languages) files.
228
+ */
229
+ enabled?: boolean;
230
+ /**
231
+ * The size of the indentation applied to JSON (and its super languages) files. Default to 2.
232
+ */
233
+ indent_size?: number;
234
+ /**
235
+ * The indent style applied to JSON (and its super languages) files.
236
+ */
237
+ indent_style?: PlainIndentStyle;
238
+ /**
239
+ * What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.
240
+ */
241
+ line_width?: LineWidth;
242
+ }
205
243
  interface JsonParser {
206
244
  /**
207
245
  * Allow parsing comments in `.json` files
@@ -241,6 +279,10 @@ interface A11y {
241
279
  * Enforce that the accessKey attribute is not used on any HTML element.
242
280
  */
243
281
  noAccessKey?: RuleConfiguration;
282
+ /**
283
+ * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
284
+ */
285
+ noAriaUnsupportedElements?: RuleConfiguration;
244
286
  /**
245
287
  * Enforce that autoFocus prop is not used on elements.
246
288
  */
@@ -261,6 +303,10 @@ interface A11y {
261
303
  * Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
262
304
  */
263
305
  noNoninteractiveElementToInteractiveRole?: RuleConfiguration;
306
+ /**
307
+ * Enforce that tabIndex is not assigned to non-interactive HTML elements.
308
+ */
309
+ noNoninteractiveTabindex?: RuleConfiguration;
264
310
  /**
265
311
  * Prevent the usage of positive integers on tabIndex property
266
312
  */
@@ -269,6 +315,10 @@ interface A11y {
269
315
  * Enforce img alt prop does not contain the word "image", "picture", or "photo".
270
316
  */
271
317
  noRedundantAlt?: RuleConfiguration;
318
+ /**
319
+ * Enforce explicit role property is not the same as implicit/default role property on an element.
320
+ */
321
+ noRedundantRoles?: RuleConfiguration;
272
322
  /**
273
323
  * Enforces the usage of the title element for the svg element.
274
324
  */
@@ -325,6 +375,10 @@ interface A11y {
325
375
  * Ensures that ARIA properties aria-* are all valid.
326
376
  */
327
377
  useValidAriaProps?: RuleConfiguration;
378
+ /**
379
+ * Enforce that ARIA state and property values are valid.
380
+ */
381
+ useValidAriaValues?: RuleConfiguration;
328
382
  /**
329
383
  * Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.
330
384
  */
@@ -335,6 +389,10 @@ interface Complexity {
335
389
  * It enables ALL rules for this group.
336
390
  */
337
391
  all?: boolean;
392
+ /**
393
+ * Disallow primitive type aliases and misleading types.
394
+ */
395
+ noBannedTypes?: RuleConfiguration;
338
396
  /**
339
397
  * Disallow unnecessary boolean casts
340
398
  */
@@ -347,6 +405,10 @@ interface Complexity {
347
405
  * Disallow unclear usage of multiple space characters in regular expression literals
348
406
  */
349
407
  noMultipleSpacesInRegularExpressionLiterals?: RuleConfiguration;
408
+ /**
409
+ * This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
410
+ */
411
+ noStaticOnlyClass?: RuleConfiguration;
350
412
  /**
351
413
  * Disallow unnecessary catch clauses.
352
414
  */
@@ -355,6 +417,10 @@ interface Complexity {
355
417
  * Disallow unnecessary constructors.
356
418
  */
357
419
  noUselessConstructor?: RuleConfiguration;
420
+ /**
421
+ * Disallow empty exports that don't change anything in a module file.
422
+ */
423
+ noUselessEmptyExport?: RuleConfiguration;
358
424
  /**
359
425
  * Disallow unnecessary fragments
360
426
  */
@@ -371,6 +437,10 @@ interface Complexity {
371
437
  * Disallow useless case in switch statements.
372
438
  */
373
439
  noUselessSwitchCase?: RuleConfiguration;
440
+ /**
441
+ * Disallow useless this aliasing.
442
+ */
443
+ noUselessThisAlias?: RuleConfiguration;
374
444
  /**
375
445
  * Disallow using any or unknown as type constraint.
376
446
  */
@@ -417,6 +487,10 @@ interface Correctness {
417
487
  * Prevents from having const variables being re-assigned.
418
488
  */
419
489
  noConstAssign?: RuleConfiguration;
490
+ /**
491
+ * Disallow constant expressions in conditions
492
+ */
493
+ noConstantCondition?: RuleConfiguration;
420
494
  /**
421
495
  * Disallow returning a value from a constructor.
422
496
  */
@@ -441,6 +515,10 @@ interface Correctness {
441
515
  * Disallow new operators with the Symbol object.
442
516
  */
443
517
  noNewSymbol?: RuleConfiguration;
518
+ /**
519
+ * Disallow \8 and \9 escape sequences in string literals.
520
+ */
521
+ noNonoctalDecimalEscape?: RuleConfiguration;
444
522
  /**
445
523
  * Disallow literal numbers that lose precision
446
524
  */
@@ -449,6 +527,10 @@ interface Correctness {
449
527
  * Prevent the usage of the return value of React.render.
450
528
  */
451
529
  noRenderReturnValue?: RuleConfiguration;
530
+ /**
531
+ * Disallow assignments where both sides are exactly the same.
532
+ */
533
+ noSelfAssign?: RuleConfiguration;
452
534
  /**
453
535
  * Disallow returning a value from a setter
454
536
  */
@@ -528,25 +610,9 @@ interface Nursery {
528
610
  */
529
611
  noAccumulatingSpread?: RuleConfiguration;
530
612
  /**
531
- * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
613
+ * Disallow void type outside of generic or return types.
532
614
  */
533
- noAriaUnsupportedElements?: RuleConfiguration;
534
- /**
535
- * Disallow primitive type aliases and misleading types.
536
- */
537
- noBannedTypes?: RuleConfiguration;
538
- /**
539
- * Disallow arrow functions where they could be confused with comparisons.
540
- */
541
- noConfusingArrow?: RuleConfiguration;
542
- /**
543
- * Disallow constant expressions in conditions
544
- */
545
- noConstantCondition?: RuleConfiguration;
546
- /**
547
- * Prevents from having control characters and some escape sequences that match control characters in regular expressions.
548
- */
549
- noControlCharactersInRegex?: RuleConfiguration;
615
+ noConfusingVoidType?: RuleConfiguration;
550
616
  /**
551
617
  * Disallow two keys with the same name inside a JSON object.
552
618
  */
@@ -567,38 +633,6 @@ interface Nursery {
567
633
  * Use Number.isNaN instead of global isNaN.
568
634
  */
569
635
  noGlobalIsNan?: RuleConfiguration;
570
- /**
571
- * Enforce that tabIndex is not assigned to non-interactive HTML elements.
572
- */
573
- noNoninteractiveTabindex?: RuleConfiguration;
574
- /**
575
- * Disallow \8 and \9 escape sequences in string literals.
576
- */
577
- noNonoctalDecimalEscape?: RuleConfiguration;
578
- /**
579
- * Enforce explicit role property is not the same as implicit/default role property on an element.
580
- */
581
- noRedundantRoles?: RuleConfiguration;
582
- /**
583
- * Disallow assignments where both sides are exactly the same.
584
- */
585
- noSelfAssign?: RuleConfiguration;
586
- /**
587
- * This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
588
- */
589
- noStaticOnlyClass?: RuleConfiguration;
590
- /**
591
- * Disallow unsafe declaration merging between interfaces and classes.
592
- */
593
- noUnsafeDeclarationMerging?: RuleConfiguration;
594
- /**
595
- * Disallow empty exports that don't change anything in a module file.
596
- */
597
- noUselessEmptyExport?: RuleConfiguration;
598
- /**
599
- * Disallow useless this aliasing.
600
- */
601
- noUselessThisAlias?: RuleConfiguration;
602
636
  /**
603
637
  * Disallow the use of void operators, which is not a familiar operator.
604
638
  */
@@ -607,10 +641,6 @@ interface Nursery {
607
641
  * It enables the recommended rules for this group
608
642
  */
609
643
  recommended?: boolean;
610
- /**
611
- * Enforce that ARIA state and property values are valid.
612
- */
613
- useAriaPropTypes?: RuleConfiguration;
614
644
  /**
615
645
  * Use arrow functions over function expressions.
616
646
  */
@@ -623,10 +653,6 @@ interface Nursery {
623
653
  * Enforce all dependencies are correctly specified.
624
654
  */
625
655
  useExhaustiveDependencies?: RuleConfiguration;
626
- /**
627
- * Enforce get methods to always return a value.
628
- */
629
- useGetterReturn?: RuleConfiguration;
630
656
  /**
631
657
  * Enforce the use of import type when an import only has specifiers with type qualifier.
632
658
  */
@@ -643,14 +669,6 @@ interface Nursery {
643
669
  * Use Array.isArray() instead of instanceof Array.
644
670
  */
645
671
  useIsArray?: RuleConfiguration;
646
- /**
647
- * Require all enum members to be literal values.
648
- */
649
- useLiteralEnumMembers?: RuleConfiguration;
650
- /**
651
- * Enforce naming conventions for everything across a codebase.
652
- */
653
- useNamingConvention?: RuleConfiguration;
654
672
  }
655
673
  interface Performance {
656
674
  /**
@@ -769,6 +787,14 @@ interface Style {
769
787
  * This rule enforces the use of <>...</> over <Fragment>...</Fragment>.
770
788
  */
771
789
  useFragmentSyntax?: RuleConfiguration;
790
+ /**
791
+ * Require all enum members to be literal values.
792
+ */
793
+ useLiteralEnumMembers?: RuleConfiguration;
794
+ /**
795
+ * Enforce naming conventions for everything across a codebase.
796
+ */
797
+ useNamingConvention?: RuleConfiguration;
772
798
  /**
773
799
  * Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
774
800
  */
@@ -843,6 +869,10 @@ interface Suspicious {
843
869
  * Disallow TypeScript const enum
844
870
  */
845
871
  noConstEnum?: RuleConfiguration;
872
+ /**
873
+ * Prevents from having control characters and some escape sequences that match control characters in regular expressions.
874
+ */
875
+ noControlCharactersInRegex?: RuleConfiguration;
846
876
  /**
847
877
  * Disallow the use of debugger
848
878
  */
@@ -919,6 +949,10 @@ interface Suspicious {
919
949
  * Disallow sparse arrays
920
950
  */
921
951
  noSparseArray?: RuleConfiguration;
952
+ /**
953
+ * Disallow unsafe declaration merging between interfaces and classes.
954
+ */
955
+ noUnsafeDeclarationMerging?: RuleConfiguration;
922
956
  /**
923
957
  * Disallow using unsafe negation.
924
958
  */
@@ -931,6 +965,10 @@ interface Suspicious {
931
965
  * Enforce default clauses in switch statements to be last
932
966
  */
933
967
  useDefaultSwitchClauseLast?: RuleConfiguration;
968
+ /**
969
+ * Enforce get methods to always return a value.
970
+ */
971
+ useGetterReturn?: RuleConfiguration;
934
972
  /**
935
973
  * Require using the namespace keyword over the module keyword to declare TypeScript namespaces.
936
974
  */
@@ -1071,16 +1109,20 @@ interface Advices {
1071
1109
  }
1072
1110
  type Category =
1073
1111
  | "lint/a11y/noAccessKey"
1112
+ | "lint/a11y/noAriaUnsupportedElements"
1074
1113
  | "lint/a11y/noAutofocus"
1075
1114
  | "lint/a11y/noBlankTarget"
1076
1115
  | "lint/a11y/noDistractingElements"
1077
1116
  | "lint/a11y/noHeaderScope"
1078
1117
  | "lint/a11y/noNoninteractiveElementToInteractiveRole"
1118
+ | "lint/a11y/noNoninteractiveTabindex"
1079
1119
  | "lint/a11y/noPositiveTabindex"
1080
1120
  | "lint/a11y/noRedundantAlt"
1121
+ | "lint/a11y/noRedundantRoles"
1081
1122
  | "lint/a11y/noSvgWithoutTitle"
1082
1123
  | "lint/a11y/useAltText"
1083
1124
  | "lint/a11y/useAnchorContent"
1125
+ | "lint/a11y/useValidAriaValues"
1084
1126
  | "lint/a11y/useAriaPropsForRole"
1085
1127
  | "lint/a11y/useButtonType"
1086
1128
  | "lint/a11y/useHeadingContent"
@@ -1092,15 +1134,19 @@ type Category =
1092
1134
  | "lint/a11y/useValidAnchor"
1093
1135
  | "lint/a11y/useValidAriaProps"
1094
1136
  | "lint/a11y/useValidLang"
1137
+ | "lint/complexity/noBannedTypes"
1095
1138
  | "lint/complexity/noExtraBooleanCast"
1096
1139
  | "lint/complexity/noForEach"
1097
1140
  | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
1141
+ | "lint/complexity/noStaticOnlyClass"
1098
1142
  | "lint/complexity/noUselessCatch"
1099
1143
  | "lint/complexity/noUselessConstructor"
1144
+ | "lint/complexity/noUselessEmptyExport"
1100
1145
  | "lint/complexity/noUselessFragments"
1101
1146
  | "lint/complexity/noUselessLabel"
1102
1147
  | "lint/complexity/noUselessRename"
1103
1148
  | "lint/complexity/noUselessSwitchCase"
1149
+ | "lint/complexity/noUselessThisAlias"
1104
1150
  | "lint/complexity/noUselessTypeConstraint"
1105
1151
  | "lint/complexity/noWith"
1106
1152
  | "lint/complexity/useFlatMap"
@@ -1110,15 +1156,17 @@ type Category =
1110
1156
  | "lint/complexity/useSimplifiedLogicExpression"
1111
1157
  | "lint/correctness/noChildrenProp"
1112
1158
  | "lint/correctness/noConstAssign"
1159
+ | "lint/correctness/noConstantCondition"
1113
1160
  | "lint/correctness/noConstructorReturn"
1114
1161
  | "lint/correctness/noEmptyPattern"
1115
1162
  | "lint/correctness/noGlobalObjectCalls"
1116
1163
  | "lint/correctness/noInnerDeclarations"
1117
1164
  | "lint/correctness/noInvalidConstructorSuper"
1118
- | "lint/correctness/useIsNan"
1119
1165
  | "lint/correctness/noNewSymbol"
1166
+ | "lint/correctness/noNonoctalDecimalEscape"
1120
1167
  | "lint/correctness/noPrecisionLoss"
1121
1168
  | "lint/correctness/noRenderReturnValue"
1169
+ | "lint/correctness/noSelfAssign"
1122
1170
  | "lint/correctness/noSetterReturn"
1123
1171
  | "lint/correctness/noStringCaseMismatch"
1124
1172
  | "lint/correctness/noSwitchDeclarations"
@@ -1132,40 +1180,25 @@ type Category =
1132
1180
  | "lint/correctness/noUnusedVariables"
1133
1181
  | "lint/correctness/noVoidElementsWithChildren"
1134
1182
  | "lint/correctness/noVoidTypeReturn"
1183
+ | "lint/correctness/useIsNan"
1135
1184
  | "lint/correctness/useValidForDirection"
1136
1185
  | "lint/correctness/useYield"
1137
1186
  | "lint/nursery/noAccumulatingSpread"
1138
- | "lint/nursery/noAriaUnsupportedElements"
1139
- | "lint/nursery/noBannedTypes"
1140
- | "lint/nursery/noConfusingArrow"
1141
- | "lint/nursery/noConstantCondition"
1142
- | "lint/nursery/noControlCharactersInRegex"
1187
+ | "lint/nursery/noConfusingVoidType"
1143
1188
  | "lint/nursery/noDuplicateJsonKeys"
1144
1189
  | "lint/nursery/noExcessiveComplexity"
1145
1190
  | "lint/nursery/noFallthroughSwitchClause"
1146
1191
  | "lint/nursery/noGlobalIsFinite"
1147
1192
  | "lint/nursery/noGlobalIsNan"
1148
- | "lint/nursery/noNoninteractiveTabindex"
1149
- | "lint/nursery/noNonoctalDecimalEscape"
1150
- | "lint/nursery/noRedundantRoles"
1151
- | "lint/nursery/noSelfAssign"
1152
- | "lint/nursery/noStaticOnlyClass"
1153
- | "lint/nursery/noUnsafeDeclarationMerging"
1154
- | "lint/nursery/noUselessEmptyExport"
1155
- | "lint/nursery/noUselessThisAlias"
1156
1193
  | "lint/nursery/noVoid"
1157
- | "lint/nursery/useAriaPropTypes"
1158
1194
  | "lint/nursery/useArrowFunction"
1159
1195
  | "lint/nursery/useBiomeSuppressionComment"
1160
1196
  | "lint/nursery/useCollapsedElseIf"
1161
1197
  | "lint/nursery/useExhaustiveDependencies"
1162
- | "lint/nursery/useGetterReturn"
1163
1198
  | "lint/nursery/useGroupedTypeImport"
1164
1199
  | "lint/nursery/useHookAtTopLevel"
1165
1200
  | "lint/nursery/useImportRestrictions"
1166
1201
  | "lint/nursery/useIsArray"
1167
- | "lint/nursery/useLiteralEnumMembers"
1168
- | "lint/nursery/useNamingConvention"
1169
1202
  | "lint/performance/noDelete"
1170
1203
  | "lint/security/noDangerouslySetInnerHtml"
1171
1204
  | "lint/security/noDangerouslySetInnerHtmlWithChildren"
@@ -1188,6 +1221,8 @@ type Category =
1188
1221
  | "lint/style/useEnumInitializers"
1189
1222
  | "lint/style/useExponentiationOperator"
1190
1223
  | "lint/style/useFragmentSyntax"
1224
+ | "lint/style/useLiteralEnumMembers"
1225
+ | "lint/style/useNamingConvention"
1191
1226
  | "lint/style/useNumericLiterals"
1192
1227
  | "lint/style/useSelfClosingElements"
1193
1228
  | "lint/style/useShorthandArrayType"
@@ -1205,6 +1240,7 @@ type Category =
1205
1240
  | "lint/suspicious/noConfusingLabels"
1206
1241
  | "lint/suspicious/noConsoleLog"
1207
1242
  | "lint/suspicious/noConstEnum"
1243
+ | "lint/suspicious/noControlCharactersInRegex"
1208
1244
  | "lint/suspicious/noDebugger"
1209
1245
  | "lint/suspicious/noDoubleEquals"
1210
1246
  | "lint/suspicious/noDuplicateCase"
@@ -1224,8 +1260,10 @@ type Category =
1224
1260
  | "lint/suspicious/noSelfCompare"
1225
1261
  | "lint/suspicious/noShadowRestrictedNames"
1226
1262
  | "lint/suspicious/noSparseArray"
1263
+ | "lint/suspicious/noUnsafeDeclarationMerging"
1227
1264
  | "lint/suspicious/noUnsafeNegation"
1228
1265
  | "lint/suspicious/useDefaultSwitchClauseLast"
1266
+ | "lint/suspicious/useGetterReturn"
1229
1267
  | "lint/suspicious/useNamespaceKeyword"
1230
1268
  | "lint/suspicious/useValidTypeof"
1231
1269
  | "files/missingHandler"
@@ -963,7 +963,7 @@ function initSync(module) {
963
963
 
964
964
  async function init(input) {
965
965
  if (typeof input === 'undefined') {
966
- input = new URL('rome_wasm_bg.wasm', import.meta.url);
966
+ input = new URL('biome_wasm_bg.wasm', import.meta.url);
967
967
  }
968
968
  const imports = getImports();
969
969
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/wasm-web","collaborators":["Rome Tools Developers and Contributors"],"description":"WebAssembly bindings to the Rome Workspace API","version":"1.1.2","license":"MIT","repository":{"type":"git","url":"https://github.com/biomejs/biome"},"files":["rome_wasm_bg.wasm","rome_wasm.js","rome_wasm.d.ts"],"module":"rome_wasm.js","types":"rome_wasm.d.ts","sideEffects":["./snippets/*"]}
1
+ {"name":"@biomejs/wasm-web","collaborators":["Rome Tools Developers and Contributors"],"description":"WebAssembly bindings to the Rome Workspace API","version":"1.2.0","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","types":"biome_wasm.d.ts","sideEffects":["./snippets/*"]}