@biomejs/wasm-web 1.7.0 → 1.7.2
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 +82 -5
- package/biome_wasm.js +19 -0
- package/biome_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/biome_wasm.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface UpdateSettingsParams {
|
|
|
24
24
|
configuration: PartialConfiguration;
|
|
25
25
|
gitignore_matches: string[];
|
|
26
26
|
vcs_base_path?: string;
|
|
27
|
-
|
|
27
|
+
workspace_directory?: string;
|
|
28
28
|
}
|
|
29
29
|
interface PartialConfiguration {
|
|
30
30
|
/**
|
|
@@ -154,8 +154,8 @@ If defined here, they should not emit diagnostics.
|
|
|
154
154
|
/**
|
|
155
155
|
* Indicates the type of runtime or transformation used for interpreting JSX.
|
|
156
156
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
jsxRuntime?: JsxRuntime;
|
|
158
|
+
organizeImports?: PartialJavascriptOrganizeImports;
|
|
159
159
|
/**
|
|
160
160
|
* Parsing options
|
|
161
161
|
*/
|
|
@@ -327,7 +327,7 @@ interface PartialJavascriptFormatter {
|
|
|
327
327
|
*/
|
|
328
328
|
trailingComma?: TrailingComma;
|
|
329
329
|
}
|
|
330
|
-
type JsxRuntime = "
|
|
330
|
+
type JsxRuntime = "transparent" | "reactClassic";
|
|
331
331
|
interface PartialJavascriptOrganizeImports {}
|
|
332
332
|
interface PartialJavascriptParser {
|
|
333
333
|
/**
|
|
@@ -867,6 +867,10 @@ interface Nursery {
|
|
|
867
867
|
* Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
|
|
868
868
|
*/
|
|
869
869
|
noConstantMathMinMaxClamp?: RuleConfiguration_for_Null;
|
|
870
|
+
/**
|
|
871
|
+
* Disallow CSS empty blocks.
|
|
872
|
+
*/
|
|
873
|
+
noCssEmptyBlock?: RuleConfiguration_for_NoCssEmptyBlockOptions;
|
|
870
874
|
/**
|
|
871
875
|
* Disallow using a callback in asynchronous tests and hooks.
|
|
872
876
|
*/
|
|
@@ -883,6 +887,10 @@ interface Nursery {
|
|
|
883
887
|
* Disallow two keys with the same name inside a JSON object.
|
|
884
888
|
*/
|
|
885
889
|
noDuplicateJsonKeys?: RuleConfiguration_for_Null;
|
|
890
|
+
/**
|
|
891
|
+
* Disallow duplicate selectors within keyframe blocks.
|
|
892
|
+
*/
|
|
893
|
+
noDuplicateSelectorsKeyframeBlock?: RuleConfiguration_for_Null;
|
|
886
894
|
/**
|
|
887
895
|
* Disallow variables from evolving into any type through reassignments.
|
|
888
896
|
*/
|
|
@@ -891,6 +899,10 @@ interface Nursery {
|
|
|
891
899
|
* Disallow to use unnecessary callback on flatMap.
|
|
892
900
|
*/
|
|
893
901
|
noFlatMapIdentity?: RuleConfiguration_for_Null;
|
|
902
|
+
/**
|
|
903
|
+
* Disallow invalid !important within keyframe declarations
|
|
904
|
+
*/
|
|
905
|
+
noImportantInKeyframe?: RuleConfiguration_for_Null;
|
|
894
906
|
/**
|
|
895
907
|
* Checks that the assertion function, for example expect, is placed inside an it() function call.
|
|
896
908
|
*/
|
|
@@ -899,6 +911,10 @@ interface Nursery {
|
|
|
899
911
|
* Forbid the use of Node.js builtin modules.
|
|
900
912
|
*/
|
|
901
913
|
noNodejsModules?: RuleConfiguration_for_Null;
|
|
914
|
+
/**
|
|
915
|
+
* Prevents React-specific JSX properties from being used.
|
|
916
|
+
*/
|
|
917
|
+
noReactSpecificProps?: RuleConfiguration_for_Null;
|
|
902
918
|
/**
|
|
903
919
|
* Disallow specified modules when loaded by import or require.
|
|
904
920
|
*/
|
|
@@ -907,10 +923,38 @@ interface Nursery {
|
|
|
907
923
|
* Disallow the use of dependencies that aren't specified in the package.json.
|
|
908
924
|
*/
|
|
909
925
|
noUndeclaredDependencies?: RuleConfiguration_for_Null;
|
|
926
|
+
/**
|
|
927
|
+
* Disallow unknown CSS value functions.
|
|
928
|
+
*/
|
|
929
|
+
noUnknownFunction?: RuleConfiguration_for_Null;
|
|
930
|
+
/**
|
|
931
|
+
* Disallow unknown CSS units.
|
|
932
|
+
*/
|
|
933
|
+
noUnknownUnit?: RuleConfiguration_for_Null;
|
|
934
|
+
/**
|
|
935
|
+
* Disallow initializing variables to undefined.
|
|
936
|
+
*/
|
|
937
|
+
noUselessUndefinedInitialization?: RuleConfiguration_for_Null;
|
|
910
938
|
/**
|
|
911
939
|
* It enables the recommended rules for this group
|
|
912
940
|
*/
|
|
913
941
|
recommended?: boolean;
|
|
942
|
+
/**
|
|
943
|
+
* Disallow Array constructors.
|
|
944
|
+
*/
|
|
945
|
+
useArrayLiterals?: RuleConfiguration_for_Null;
|
|
946
|
+
/**
|
|
947
|
+
* Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
|
|
948
|
+
*/
|
|
949
|
+
useConsistentBuiltinInstatiation?: RuleConfiguration_for_Null;
|
|
950
|
+
/**
|
|
951
|
+
* Require the default clause in switch statements.
|
|
952
|
+
*/
|
|
953
|
+
useDefaultSwitchClause?: RuleConfiguration_for_Null;
|
|
954
|
+
/**
|
|
955
|
+
* Disallow a missing generic family keyword within font families.
|
|
956
|
+
*/
|
|
957
|
+
useGenericFontNames?: RuleConfiguration_for_Null;
|
|
914
958
|
/**
|
|
915
959
|
* Disallows package private imports.
|
|
916
960
|
*/
|
|
@@ -1058,7 +1102,7 @@ interface Style {
|
|
|
1058
1102
|
*/
|
|
1059
1103
|
useConsistentArrayType?: RuleConfiguration_for_ConsistentArrayTypeOptions;
|
|
1060
1104
|
/**
|
|
1061
|
-
* Require const declarations for variables that are
|
|
1105
|
+
* Require const declarations for variables that are only assigned once.
|
|
1062
1106
|
*/
|
|
1063
1107
|
useConst?: RuleConfiguration_for_Null;
|
|
1064
1108
|
/**
|
|
@@ -1442,6 +1486,9 @@ type RuleConfiguration_for_HooksOptions =
|
|
|
1442
1486
|
type RuleConfiguration_for_DeprecatedHooksOptions =
|
|
1443
1487
|
| RulePlainConfiguration
|
|
1444
1488
|
| RuleWithOptions_for_DeprecatedHooksOptions;
|
|
1489
|
+
type RuleConfiguration_for_NoCssEmptyBlockOptions =
|
|
1490
|
+
| RulePlainConfiguration
|
|
1491
|
+
| RuleWithOptions_for_NoCssEmptyBlockOptions;
|
|
1445
1492
|
type RuleConfiguration_for_RestrictedImportsOptions =
|
|
1446
1493
|
| RulePlainConfiguration
|
|
1447
1494
|
| RuleWithOptions_for_RestrictedImportsOptions;
|
|
@@ -1481,6 +1528,10 @@ interface RuleWithOptions_for_DeprecatedHooksOptions {
|
|
|
1481
1528
|
level: RulePlainConfiguration;
|
|
1482
1529
|
options: DeprecatedHooksOptions;
|
|
1483
1530
|
}
|
|
1531
|
+
interface RuleWithOptions_for_NoCssEmptyBlockOptions {
|
|
1532
|
+
level: RulePlainConfiguration;
|
|
1533
|
+
options: NoCssEmptyBlockOptions;
|
|
1534
|
+
}
|
|
1484
1535
|
interface RuleWithOptions_for_RestrictedImportsOptions {
|
|
1485
1536
|
level: RulePlainConfiguration;
|
|
1486
1537
|
options: RestrictedImportsOptions;
|
|
@@ -1522,6 +1573,9 @@ interface HooksOptions {
|
|
|
1522
1573
|
hooks: Hook[];
|
|
1523
1574
|
}
|
|
1524
1575
|
interface DeprecatedHooksOptions {}
|
|
1576
|
+
interface NoCssEmptyBlockOptions {
|
|
1577
|
+
allowComments: boolean;
|
|
1578
|
+
}
|
|
1525
1579
|
interface RestrictedImportsOptions {
|
|
1526
1580
|
/**
|
|
1527
1581
|
* A list of names that should trigger the rule
|
|
@@ -1611,6 +1665,11 @@ type FilenameCase =
|
|
|
1611
1665
|
| "kebab-case"
|
|
1612
1666
|
| "PascalCase"
|
|
1613
1667
|
| "snake_case";
|
|
1668
|
+
interface RegisterProjectFolderParams {
|
|
1669
|
+
path?: string;
|
|
1670
|
+
setAsCurrentWorkspace: boolean;
|
|
1671
|
+
}
|
|
1672
|
+
type ProjectKey = string;
|
|
1614
1673
|
interface UpdateProjectParams {
|
|
1615
1674
|
path: BiomePath;
|
|
1616
1675
|
}
|
|
@@ -1809,21 +1868,33 @@ type Category =
|
|
|
1809
1868
|
| "lint/correctness/useValidForDirection"
|
|
1810
1869
|
| "lint/correctness/useYield"
|
|
1811
1870
|
| "lint/nursery/colorNoInvalidHex"
|
|
1871
|
+
| "lint/nursery/useArrayLiterals"
|
|
1812
1872
|
| "lint/nursery/noColorInvalidHex"
|
|
1813
1873
|
| "lint/nursery/noConsole"
|
|
1814
1874
|
| "lint/nursery/noConstantMathMinMaxClamp"
|
|
1875
|
+
| "lint/nursery/noCssEmptyBlock"
|
|
1815
1876
|
| "lint/nursery/noDoneCallback"
|
|
1816
1877
|
| "lint/nursery/noDuplicateElseIf"
|
|
1817
1878
|
| "lint/nursery/noDuplicateFontNames"
|
|
1818
1879
|
| "lint/nursery/noDuplicateJsonKeys"
|
|
1880
|
+
| "lint/nursery/noDuplicateSelectorsKeyframeBlock"
|
|
1819
1881
|
| "lint/nursery/noEvolvingAny"
|
|
1820
1882
|
| "lint/nursery/noFlatMapIdentity"
|
|
1883
|
+
| "lint/nursery/noImportantInKeyframe"
|
|
1821
1884
|
| "lint/nursery/noMisplacedAssertion"
|
|
1885
|
+
| "lint/nursery/noMissingGenericFamilyKeyword"
|
|
1822
1886
|
| "lint/nursery/noNodejsModules"
|
|
1887
|
+
| "lint/nursery/noReactSpecificProps"
|
|
1823
1888
|
| "lint/nursery/noRestrictedImports"
|
|
1824
1889
|
| "lint/nursery/noTypeOnlyImportAttributes"
|
|
1825
1890
|
| "lint/nursery/noUndeclaredDependencies"
|
|
1891
|
+
| "lint/nursery/noUnknownFunction"
|
|
1892
|
+
| "lint/nursery/noUselessUndefinedInitialization"
|
|
1893
|
+
| "lint/nursery/noUnknownUnit"
|
|
1826
1894
|
| "lint/nursery/useBiomeSuppressionComment"
|
|
1895
|
+
| "lint/nursery/useConsistentBuiltinInstatiation"
|
|
1896
|
+
| "lint/nursery/useGenericFontNames"
|
|
1897
|
+
| "lint/nursery/useDefaultSwitchClause"
|
|
1827
1898
|
| "lint/nursery/useImportRestrictions"
|
|
1828
1899
|
| "lint/nursery/useSortedClasses"
|
|
1829
1900
|
| "lint/performance/noAccumulatingSpread"
|
|
@@ -2180,6 +2251,11 @@ export class Workspace {
|
|
|
2180
2251
|
*/
|
|
2181
2252
|
updateSettings(params: UpdateSettingsParams): void;
|
|
2182
2253
|
/**
|
|
2254
|
+
* @param {RegisterProjectFolderParams} params
|
|
2255
|
+
* @returns {ProjectKey}
|
|
2256
|
+
*/
|
|
2257
|
+
registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
|
|
2258
|
+
/**
|
|
2183
2259
|
* @param {OpenFileParams} params
|
|
2184
2260
|
*/
|
|
2185
2261
|
openFile(params: OpenFileParams): void;
|
|
@@ -2261,6 +2337,7 @@ export interface InitOutput {
|
|
|
2261
2337
|
readonly workspace_new: () => number;
|
|
2262
2338
|
readonly workspace_fileFeatures: (a: number, b: number, c: number) => void;
|
|
2263
2339
|
readonly workspace_updateSettings: (a: number, b: number, c: number) => void;
|
|
2340
|
+
readonly workspace_registerProjectFolder: (a: number, b: number, c: number) => void;
|
|
2264
2341
|
readonly workspace_openFile: (a: number, b: number, c: number) => void;
|
|
2265
2342
|
readonly workspace_getFileContent: (a: number, b: number, c: number) => void;
|
|
2266
2343
|
readonly workspace_getSyntaxTree: (a: number, b: number, c: number) => void;
|
package/biome_wasm.js
CHANGED
|
@@ -364,6 +364,25 @@ export class Workspace {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
|
+
* @param {RegisterProjectFolderParams} params
|
|
368
|
+
* @returns {ProjectKey}
|
|
369
|
+
*/
|
|
370
|
+
registerProjectFolder(params) {
|
|
371
|
+
try {
|
|
372
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
373
|
+
wasm.workspace_registerProjectFolder(retptr, this.ptr, addHeapObject(params));
|
|
374
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
375
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
376
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
377
|
+
if (r2) {
|
|
378
|
+
throw takeObject(r1);
|
|
379
|
+
}
|
|
380
|
+
return takeObject(r0);
|
|
381
|
+
} finally {
|
|
382
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
367
386
|
* @param {OpenFileParams} params
|
|
368
387
|
*/
|
|
369
388
|
openFile(params) {
|
package/biome_wasm_bg.wasm
CHANGED
|
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.7.
|
|
1
|
+
{"name":"@biomejs/wasm-web","collaborators":["Biome Developers and Contributors"],"description":"WebAssembly bindings to the Biome workspace API","version":"1.7.2","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"]}
|