@biomejs/wasm-web 1.6.4 → 1.7.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
@@ -151,6 +151,10 @@ interface PartialJavascriptConfiguration {
151
151
  If defined here, they should not emit diagnostics.
152
152
  */
153
153
  globals?: StringSet;
154
+ /**
155
+ * Indicates the type of runtime or transformation used for interpreting JSX.
156
+ */
157
+ jsx_runtime?: JsxRuntime;
154
158
  organize_imports?: PartialJavascriptOrganizeImports;
155
159
  /**
156
160
  * Parsing options
@@ -323,6 +327,7 @@ interface PartialJavascriptFormatter {
323
327
  */
324
328
  trailingComma?: TrailingComma;
325
329
  }
330
+ type JsxRuntime = "Transparent" | "ReactClassic";
326
331
  interface PartialJavascriptOrganizeImports {}
327
332
  interface PartialJavascriptParser {
328
333
  /**
@@ -461,7 +466,7 @@ interface A11y {
461
466
  */
462
467
  noDistractingElements?: RuleConfiguration_for_Null;
463
468
  /**
464
- * The scope prop should be used only on <th> elements.
469
+ * The scope prop should be used only on \<th> elements.
465
470
  */
466
471
  noHeaderScope?: RuleConfiguration_for_Null;
467
472
  /**
@@ -578,6 +583,10 @@ interface Complexity {
578
583
  * Disallow functions that exceed a given Cognitive Complexity score.
579
584
  */
580
585
  noExcessiveCognitiveComplexity?: RuleConfiguration_for_ComplexityOptions;
586
+ /**
587
+ * This rule enforces a maximum depth to nested describe() in test files.
588
+ */
589
+ noExcessiveNestedTestSuites?: RuleConfiguration_for_Null;
581
590
  /**
582
591
  * Disallow unnecessary boolean casts
583
592
  */
@@ -630,6 +639,10 @@ interface Complexity {
630
639
  * Disallow useless case in switch statements.
631
640
  */
632
641
  noUselessSwitchCase?: RuleConfiguration_for_Null;
642
+ /**
643
+ * Disallow ternary operators when simpler alternatives exist.
644
+ */
645
+ noUselessTernary?: RuleConfiguration_for_Null;
633
646
  /**
634
647
  * Disallow useless this aliasing.
635
648
  */
@@ -824,6 +837,10 @@ interface Correctness {
824
837
  * Require calls to isNaN() when checking for NaN.
825
838
  */
826
839
  useIsNan?: RuleConfiguration_for_Null;
840
+ /**
841
+ * Disallow missing key props in iterators/collection literals.
842
+ */
843
+ useJsxKeyInIterable?: RuleConfiguration_for_Null;
827
844
  /**
828
845
  * Enforce "for" loop update clause moving the counter in the right direction.
829
846
  */
@@ -839,17 +856,17 @@ interface Nursery {
839
856
  */
840
857
  all?: boolean;
841
858
  /**
842
- * Disallow the use of barrel file.
843
- */
844
- noBarrelFile?: RuleConfiguration_for_Null;
845
- /**
846
- * [WIP] This rule hasn't been implemented yet.
859
+ * WIP: This rule hasn't been implemented yet.
847
860
  */
848
861
  noColorInvalidHex?: RuleConfiguration_for_Null;
849
862
  /**
850
863
  * Disallow the use of console.
851
864
  */
852
865
  noConsole?: RuleConfiguration_for_Null;
866
+ /**
867
+ * Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
868
+ */
869
+ noConstantMathMinMaxClamp?: RuleConfiguration_for_Null;
853
870
  /**
854
871
  * Disallow using a callback in asynchronous tests and hooks.
855
872
  */
@@ -859,65 +876,37 @@ interface Nursery {
859
876
  */
860
877
  noDuplicateElseIf?: RuleConfiguration_for_Null;
861
878
  /**
862
- * Disallow two keys with the same name inside a JSON object.
879
+ * Disallow duplicate names within font families.
863
880
  */
864
- noDuplicateJsonKeys?: RuleConfiguration_for_Null;
881
+ noDuplicateFontNames?: RuleConfiguration_for_Null;
865
882
  /**
866
- * A describe block should not contain duplicate hooks.
883
+ * Disallow two keys with the same name inside a JSON object.
867
884
  */
868
- noDuplicateTestHooks?: RuleConfiguration_for_Null;
885
+ noDuplicateJsonKeys?: RuleConfiguration_for_Null;
869
886
  /**
870
887
  * Disallow variables from evolving into any type through reassignments.
871
888
  */
872
889
  noEvolvingAny?: RuleConfiguration_for_Null;
873
890
  /**
874
- * This rule enforces a maximum depth to nested describe() in test files.
891
+ * Disallow to use unnecessary callback on flatMap.
875
892
  */
876
- noExcessiveNestedTestSuites?: RuleConfiguration_for_Null;
877
- /**
878
- * Disallow using export or module.exports in files containing tests
879
- */
880
- noExportsInTest?: RuleConfiguration_for_Null;
881
- /**
882
- * Disallow focused tests.
883
- */
884
- noFocusedTests?: RuleConfiguration_for_Null;
893
+ noFlatMapIdentity?: RuleConfiguration_for_Null;
885
894
  /**
886
895
  * Checks that the assertion function, for example expect, is placed inside an it() function call.
887
896
  */
888
897
  noMisplacedAssertion?: RuleConfiguration_for_Null;
889
- /**
890
- * Disallow the use of namespace imports.
891
- */
892
- noNamespaceImport?: RuleConfiguration_for_Null;
893
898
  /**
894
899
  * Forbid the use of Node.js builtin modules.
895
900
  */
896
901
  noNodejsModules?: RuleConfiguration_for_Null;
897
- /**
898
- * Avoid re-export all.
899
- */
900
- noReExportAll?: RuleConfiguration_for_Null;
901
902
  /**
902
903
  * Disallow specified modules when loaded by import or require.
903
904
  */
904
905
  noRestrictedImports?: RuleConfiguration_for_RestrictedImportsOptions;
905
- /**
906
- * Disallow disabled tests.
907
- */
908
- noSkippedTests?: RuleConfiguration_for_Null;
909
- /**
910
- * It detects possible "wrong" semicolons inside JSX elements.
911
- */
912
- noSuspiciousSemicolonInJsx?: RuleConfiguration_for_Null;
913
906
  /**
914
907
  * Disallow the use of dependencies that aren't specified in the package.json.
915
908
  */
916
909
  noUndeclaredDependencies?: RuleConfiguration_for_Null;
917
- /**
918
- * Disallow ternary operators when simpler alternatives exist.
919
- */
920
- noUselessTernary?: RuleConfiguration_for_Null;
921
910
  /**
922
911
  * It enables the recommended rules for this group
923
912
  */
@@ -926,14 +915,6 @@ interface Nursery {
926
915
  * Disallows package private imports.
927
916
  */
928
917
  useImportRestrictions?: RuleConfiguration_for_Null;
929
- /**
930
- * Disallow missing key props in iterators/collection literals.
931
- */
932
- useJsxKeyInIterable?: RuleConfiguration_for_Null;
933
- /**
934
- * Promotes the usage of node:assert/strict over node:assert.
935
- */
936
- useNodeAssertStrict?: RuleConfiguration_for_Null;
937
918
  /**
938
919
  * Enforce the sorting of CSS utility classes.
939
920
  */
@@ -948,10 +929,18 @@ interface Performance {
948
929
  * Disallow the use of spread (...) syntax on accumulators.
949
930
  */
950
931
  noAccumulatingSpread?: RuleConfiguration_for_Null;
932
+ /**
933
+ * Disallow the use of barrel file.
934
+ */
935
+ noBarrelFile?: RuleConfiguration_for_Null;
951
936
  /**
952
937
  * Disallow the use of the delete operator.
953
938
  */
954
939
  noDelete?: RuleConfiguration_for_Null;
940
+ /**
941
+ * Avoid re-export all.
942
+ */
943
+ noReExportAll?: RuleConfiguration_for_Null;
955
944
  /**
956
945
  * It enables the recommended rules for this group
957
946
  */
@@ -1008,6 +997,10 @@ interface Style {
1008
997
  * Disallow the use of TypeScript's namespaces.
1009
998
  */
1010
999
  noNamespace?: RuleConfiguration_for_Null;
1000
+ /**
1001
+ * Disallow the use of namespace imports.
1002
+ */
1003
+ noNamespaceImport?: RuleConfiguration_for_Null;
1011
1004
  /**
1012
1005
  * Disallow negation in the condition of an if statement if it has an else clause.
1013
1006
  */
@@ -1061,7 +1054,7 @@ interface Style {
1061
1054
  */
1062
1055
  useCollapsedElseIf?: RuleConfiguration_for_Null;
1063
1056
  /**
1064
- * Require consistently using either T[] or Array<T>
1057
+ * Require consistently using either T\[] or Array\<T>
1065
1058
  */
1066
1059
  useConsistentArrayType?: RuleConfiguration_for_ConsistentArrayTypeOptions;
1067
1060
  /**
@@ -1093,7 +1086,7 @@ interface Style {
1093
1086
  */
1094
1087
  useForOf?: RuleConfiguration_for_Null;
1095
1088
  /**
1096
- * This rule enforces the use of <>...</> over <Fragment>...</Fragment>.
1089
+ * This rule enforces the use of \<>...\</> over \<Fragment>...\</Fragment>.
1097
1090
  */
1098
1091
  useFragmentSyntax?: RuleConfiguration_for_Null;
1099
1092
  /**
@@ -1108,6 +1101,10 @@ interface Style {
1108
1101
  * Enforce naming conventions for everything across a codebase.
1109
1102
  */
1110
1103
  useNamingConvention?: RuleConfiguration_for_NamingConventionOptions;
1104
+ /**
1105
+ * Promotes the usage of node:assert/strict over node:assert.
1106
+ */
1107
+ useNodeAssertStrict?: RuleConfiguration_for_Null;
1111
1108
  /**
1112
1109
  * Enforces using the node: protocol for Node.js builtin modules.
1113
1110
  */
@@ -1125,7 +1122,7 @@ interface Style {
1125
1122
  */
1126
1123
  useSelfClosingElements?: RuleConfiguration_for_Null;
1127
1124
  /**
1128
- * When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.
1125
+ * When expressing array types, this rule promotes the usage of T\[] shorthand instead of Array\<T>.
1129
1126
  */
1130
1127
  useShorthandArrayType?: RuleConfiguration_for_Null;
1131
1128
  /**
@@ -1238,6 +1235,10 @@ interface Suspicious {
1238
1235
  * Disallow duplicate function parameter name.
1239
1236
  */
1240
1237
  noDuplicateParameters?: RuleConfiguration_for_Null;
1238
+ /**
1239
+ * A describe block should not contain duplicate hooks.
1240
+ */
1241
+ noDuplicateTestHooks?: RuleConfiguration_for_Null;
1241
1242
  /**
1242
1243
  * Disallow empty block statements and static blocks.
1243
1244
  */
@@ -1250,6 +1251,10 @@ interface Suspicious {
1250
1251
  * Disallow the any type usage.
1251
1252
  */
1252
1253
  noExplicitAny?: RuleConfiguration_for_Null;
1254
+ /**
1255
+ * Disallow using export or module.exports in files containing tests
1256
+ */
1257
+ noExportsInTest?: RuleConfiguration_for_Null;
1253
1258
  /**
1254
1259
  * Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.
1255
1260
  */
@@ -1258,6 +1263,10 @@ interface Suspicious {
1258
1263
  * Disallow fallthrough of switch clauses.
1259
1264
  */
1260
1265
  noFallthroughSwitchClause?: RuleConfiguration_for_Null;
1266
+ /**
1267
+ * Disallow focused tests.
1268
+ */
1269
+ noFocusedTests?: RuleConfiguration_for_Null;
1261
1270
  /**
1262
1271
  * Disallow reassigning function declarations.
1263
1272
  */
@@ -1318,10 +1327,18 @@ interface Suspicious {
1318
1327
  * Disallow identifiers from shadowing restricted names.
1319
1328
  */
1320
1329
  noShadowRestrictedNames?: RuleConfiguration_for_Null;
1330
+ /**
1331
+ * Disallow disabled tests.
1332
+ */
1333
+ noSkippedTests?: RuleConfiguration_for_Null;
1321
1334
  /**
1322
1335
  * Disallow sparse arrays
1323
1336
  */
1324
1337
  noSparseArray?: RuleConfiguration_for_Null;
1338
+ /**
1339
+ * It detects possible "wrong" semicolons inside JSX elements.
1340
+ */
1341
+ noSuspiciousSemicolonInJsx?: RuleConfiguration_for_Null;
1325
1342
  /**
1326
1343
  * Disallow then property.
1327
1344
  */
@@ -1587,7 +1604,7 @@ For example, for React's `useRef()` hook the value would be `true`, while for `u
1587
1604
  type ConsistentArrayType = "shorthand" | "generic";
1588
1605
  type FilenameCases = FilenameCase[];
1589
1606
  type EnumMemberCase = "PascalCase" | "CONSTANT_CASE" | "camelCase";
1590
- type StableHookResult = "None" | "Identity" | { Indices: number[] };
1607
+ type StableHookResult = boolean | number[];
1591
1608
  type FilenameCase =
1592
1609
  | "camelCase"
1593
1610
  | "export"
@@ -1689,7 +1706,7 @@ interface Diagnostic {
1689
1706
  severity: Severity;
1690
1707
  source?: Diagnostic;
1691
1708
  tags: DiagnosticTags;
1692
- verbose_advices: Advices;
1709
+ verboseAdvices: Advices;
1693
1710
  }
1694
1711
  interface Advices {
1695
1712
  advices: Advice[];
@@ -1728,6 +1745,7 @@ type Category =
1728
1745
  | "lint/complexity/noBannedTypes"
1729
1746
  | "lint/complexity/noEmptyTypeParameters"
1730
1747
  | "lint/complexity/noExcessiveCognitiveComplexity"
1748
+ | "lint/complexity/noExcessiveNestedTestSuites"
1731
1749
  | "lint/complexity/noExtraBooleanCast"
1732
1750
  | "lint/complexity/noForEach"
1733
1751
  | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
@@ -1741,6 +1759,7 @@ type Category =
1741
1759
  | "lint/complexity/noUselessLoneBlockStatements"
1742
1760
  | "lint/complexity/noUselessRename"
1743
1761
  | "lint/complexity/noUselessSwitchCase"
1762
+ | "lint/complexity/noUselessTernary"
1744
1763
  | "lint/complexity/noUselessThisAlias"
1745
1764
  | "lint/complexity/noUselessTypeConstraint"
1746
1765
  | "lint/complexity/noVoid"
@@ -1786,38 +1805,31 @@ type Category =
1786
1805
  | "lint/correctness/useExhaustiveDependencies"
1787
1806
  | "lint/correctness/useHookAtTopLevel"
1788
1807
  | "lint/correctness/useIsNan"
1808
+ | "lint/correctness/useJsxKeyInIterable"
1789
1809
  | "lint/correctness/useValidForDirection"
1790
1810
  | "lint/correctness/useYield"
1791
1811
  | "lint/nursery/colorNoInvalidHex"
1792
- | "lint/nursery/noApproximativeNumericConstant"
1793
- | "lint/nursery/noBarrelFile"
1794
1812
  | "lint/nursery/noColorInvalidHex"
1795
1813
  | "lint/nursery/noConsole"
1814
+ | "lint/nursery/noConstantMathMinMaxClamp"
1796
1815
  | "lint/nursery/noDoneCallback"
1797
1816
  | "lint/nursery/noDuplicateElseIf"
1817
+ | "lint/nursery/noDuplicateFontNames"
1798
1818
  | "lint/nursery/noDuplicateJsonKeys"
1799
- | "lint/nursery/noDuplicateTestHooks"
1800
1819
  | "lint/nursery/noEvolvingAny"
1801
- | "lint/nursery/noExcessiveNestedTestSuites"
1802
- | "lint/nursery/noExportsInTest"
1803
- | "lint/nursery/noFocusedTests"
1820
+ | "lint/nursery/noFlatMapIdentity"
1804
1821
  | "lint/nursery/noMisplacedAssertion"
1805
- | "lint/nursery/noNamespaceImport"
1806
1822
  | "lint/nursery/noNodejsModules"
1807
- | "lint/nursery/noReExportAll"
1808
1823
  | "lint/nursery/noRestrictedImports"
1809
- | "lint/nursery/noSkippedTests"
1810
- | "lint/nursery/noSuspiciousSemicolonInJsx"
1811
1824
  | "lint/nursery/noTypeOnlyImportAttributes"
1812
1825
  | "lint/nursery/noUndeclaredDependencies"
1813
- | "lint/nursery/noUselessTernary"
1814
1826
  | "lint/nursery/useBiomeSuppressionComment"
1815
1827
  | "lint/nursery/useImportRestrictions"
1816
- | "lint/nursery/useJsxKeyInIterable"
1817
- | "lint/nursery/useNodeAssertStrict"
1818
1828
  | "lint/nursery/useSortedClasses"
1819
1829
  | "lint/performance/noAccumulatingSpread"
1830
+ | "lint/performance/noBarrelFile"
1820
1831
  | "lint/performance/noDelete"
1832
+ | "lint/performance/noReExportAll"
1821
1833
  | "lint/security/noDangerouslySetInnerHtml"
1822
1834
  | "lint/security/noDangerouslySetInnerHtmlWithChildren"
1823
1835
  | "lint/security/noGlobalEval"
@@ -1827,6 +1839,7 @@ type Category =
1827
1839
  | "lint/style/noImplicitBoolean"
1828
1840
  | "lint/style/noInferrableTypes"
1829
1841
  | "lint/style/noNamespace"
1842
+ | "lint/style/noNamespaceImport"
1830
1843
  | "lint/style/noNegationElse"
1831
1844
  | "lint/style/noNonNullAssertion"
1832
1845
  | "lint/style/noParameterAssign"
@@ -1851,6 +1864,7 @@ type Category =
1851
1864
  | "lint/style/useImportType"
1852
1865
  | "lint/style/useLiteralEnumMembers"
1853
1866
  | "lint/style/useNamingConvention"
1867
+ | "lint/style/useNodeAssertStrict"
1854
1868
  | "lint/style/useNodejsImportProtocol"
1855
1869
  | "lint/style/useNumberNamespace"
1856
1870
  | "lint/style/useNumericLiterals"
@@ -1882,11 +1896,14 @@ type Category =
1882
1896
  | "lint/suspicious/noDuplicateJsxProps"
1883
1897
  | "lint/suspicious/noDuplicateObjectKeys"
1884
1898
  | "lint/suspicious/noDuplicateParameters"
1899
+ | "lint/suspicious/noDuplicateTestHooks"
1885
1900
  | "lint/suspicious/noEmptyBlockStatements"
1886
1901
  | "lint/suspicious/noEmptyInterface"
1887
1902
  | "lint/suspicious/noExplicitAny"
1903
+ | "lint/suspicious/noExportsInTest"
1888
1904
  | "lint/suspicious/noExtraNonNullAssertion"
1889
1905
  | "lint/suspicious/noFallthroughSwitchClause"
1906
+ | "lint/suspicious/noFocusedTests"
1890
1907
  | "lint/suspicious/noFunctionAssign"
1891
1908
  | "lint/suspicious/noGlobalAssign"
1892
1909
  | "lint/suspicious/noGlobalIsFinite"
@@ -1902,7 +1919,9 @@ type Category =
1902
1919
  | "lint/suspicious/noRedundantUseStrict"
1903
1920
  | "lint/suspicious/noSelfCompare"
1904
1921
  | "lint/suspicious/noShadowRestrictedNames"
1922
+ | "lint/suspicious/noSkippedTests"
1905
1923
  | "lint/suspicious/noSparseArray"
1924
+ | "lint/suspicious/noSuspiciousSemicolonInJsx"
1906
1925
  | "lint/suspicious/noThenProperty"
1907
1926
  | "lint/suspicious/noUnsafeDeclarationMerging"
1908
1927
  | "lint/suspicious/noUnsafeNegation"
@@ -1948,20 +1967,20 @@ type Category =
1948
1967
  | "semanticTests";
1949
1968
  interface Location {
1950
1969
  path?: Resource_for_String;
1951
- source_code?: string;
1970
+ sourceCode?: string;
1952
1971
  span?: TextRange;
1953
1972
  }
1954
1973
  type MarkupBuf = MarkupNodeBuf[];
1955
1974
  type Severity = "hint" | "information" | "warning" | "error" | "fatal";
1956
1975
  type DiagnosticTags = DiagnosticTag[];
1957
1976
  type Advice =
1958
- | { Log: [LogCategory, MarkupBuf] }
1959
- | { List: MarkupBuf[] }
1960
- | { Frame: Location }
1961
- | { Diff: TextEdit }
1962
- | { Backtrace: [MarkupBuf, Backtrace] }
1963
- | { Command: string }
1964
- | { Group: [MarkupBuf, Advices] };
1977
+ | { log: [LogCategory, MarkupBuf] }
1978
+ | { list: MarkupBuf[] }
1979
+ | { frame: Location }
1980
+ | { diff: TextEdit }
1981
+ | { backtrace: [MarkupBuf, Backtrace] }
1982
+ | { command: string }
1983
+ | { group: [MarkupBuf, Advices] };
1965
1984
  type Resource_for_String = "argv" | "memory" | { file: string };
1966
1985
  type TextRange = [TextSize, TextSize];
1967
1986
  interface MarkupNodeBuf {
@@ -1974,7 +1993,7 @@ type DiagnosticTag =
1974
1993
  | "unnecessaryCode"
1975
1994
  | "deprecatedCode"
1976
1995
  | "verbose";
1977
- type LogCategory = "None" | "Info" | "Warn" | "Error";
1996
+ type LogCategory = "none" | "info" | "warn" | "error";
1978
1997
  interface TextEdit {
1979
1998
  dictionary: string;
1980
1999
  ops: CompressedOp[];
@@ -1993,15 +2012,15 @@ type MarkupElement =
1993
2012
  | "Trace"
1994
2013
  | "Inverse"
1995
2014
  | { Hyperlink: { href: string } };
1996
- type CompressedOp = { DiffOp: DiffOp } | { EqualLines: { line_count: number } };
2015
+ type CompressedOp = { diffOp: DiffOp } | { equalLines: { line_count: number } };
1997
2016
  interface BacktraceFrame {
1998
2017
  ip: number;
1999
2018
  symbols: BacktraceSymbol[];
2000
2019
  }
2001
2020
  type DiffOp =
2002
- | { Equal: { range: TextRange } }
2003
- | { Insert: { range: TextRange } }
2004
- | { Delete: { range: TextRange } };
2021
+ | { equal: { range: TextRange } }
2022
+ | { insert: { range: TextRange } }
2023
+ | { delete: { range: TextRange } };
2005
2024
  interface BacktraceSymbol {
2006
2025
  colno?: number;
2007
2026
  filename?: string;
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.6.4","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.7.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"]}