@biomejs/wasm-web 1.7.1 → 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 CHANGED
@@ -24,7 +24,7 @@ interface UpdateSettingsParams {
24
24
  configuration: PartialConfiguration;
25
25
  gitignore_matches: string[];
26
26
  vcs_base_path?: string;
27
- working_directory?: string;
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
- jsx_runtime?: JsxRuntime;
158
- organize_imports?: PartialJavascriptOrganizeImports;
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 = "Transparent" | "ReactClassic";
330
+ type JsxRuntime = "transparent" | "reactClassic";
331
331
  interface PartialJavascriptOrganizeImports {}
332
332
  interface PartialJavascriptParser {
333
333
  /**
@@ -923,10 +923,38 @@ interface Nursery {
923
923
  * Disallow the use of dependencies that aren't specified in the package.json.
924
924
  */
925
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;
926
938
  /**
927
939
  * It enables the recommended rules for this group
928
940
  */
929
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;
930
958
  /**
931
959
  * Disallows package private imports.
932
960
  */
@@ -1074,7 +1102,7 @@ interface Style {
1074
1102
  */
1075
1103
  useConsistentArrayType?: RuleConfiguration_for_ConsistentArrayTypeOptions;
1076
1104
  /**
1077
- * Require const declarations for variables that are never reassigned after declared.
1105
+ * Require const declarations for variables that are only assigned once.
1078
1106
  */
1079
1107
  useConst?: RuleConfiguration_for_Null;
1080
1108
  /**
@@ -1637,6 +1665,11 @@ type FilenameCase =
1637
1665
  | "kebab-case"
1638
1666
  | "PascalCase"
1639
1667
  | "snake_case";
1668
+ interface RegisterProjectFolderParams {
1669
+ path?: string;
1670
+ setAsCurrentWorkspace: boolean;
1671
+ }
1672
+ type ProjectKey = string;
1640
1673
  interface UpdateProjectParams {
1641
1674
  path: BiomePath;
1642
1675
  }
@@ -1835,6 +1868,7 @@ type Category =
1835
1868
  | "lint/correctness/useValidForDirection"
1836
1869
  | "lint/correctness/useYield"
1837
1870
  | "lint/nursery/colorNoInvalidHex"
1871
+ | "lint/nursery/useArrayLiterals"
1838
1872
  | "lint/nursery/noColorInvalidHex"
1839
1873
  | "lint/nursery/noConsole"
1840
1874
  | "lint/nursery/noConstantMathMinMaxClamp"
@@ -1848,12 +1882,19 @@ type Category =
1848
1882
  | "lint/nursery/noFlatMapIdentity"
1849
1883
  | "lint/nursery/noImportantInKeyframe"
1850
1884
  | "lint/nursery/noMisplacedAssertion"
1885
+ | "lint/nursery/noMissingGenericFamilyKeyword"
1851
1886
  | "lint/nursery/noNodejsModules"
1852
1887
  | "lint/nursery/noReactSpecificProps"
1853
1888
  | "lint/nursery/noRestrictedImports"
1854
1889
  | "lint/nursery/noTypeOnlyImportAttributes"
1855
1890
  | "lint/nursery/noUndeclaredDependencies"
1891
+ | "lint/nursery/noUnknownFunction"
1892
+ | "lint/nursery/noUselessUndefinedInitialization"
1893
+ | "lint/nursery/noUnknownUnit"
1856
1894
  | "lint/nursery/useBiomeSuppressionComment"
1895
+ | "lint/nursery/useConsistentBuiltinInstatiation"
1896
+ | "lint/nursery/useGenericFontNames"
1897
+ | "lint/nursery/useDefaultSwitchClause"
1857
1898
  | "lint/nursery/useImportRestrictions"
1858
1899
  | "lint/nursery/useSortedClasses"
1859
1900
  | "lint/performance/noAccumulatingSpread"
@@ -2210,6 +2251,11 @@ export class Workspace {
2210
2251
  */
2211
2252
  updateSettings(params: UpdateSettingsParams): void;
2212
2253
  /**
2254
+ * @param {RegisterProjectFolderParams} params
2255
+ * @returns {ProjectKey}
2256
+ */
2257
+ registerProjectFolder(params: RegisterProjectFolderParams): ProjectKey;
2258
+ /**
2213
2259
  * @param {OpenFileParams} params
2214
2260
  */
2215
2261
  openFile(params: OpenFileParams): void;
@@ -2291,6 +2337,7 @@ export interface InitOutput {
2291
2337
  readonly workspace_new: () => number;
2292
2338
  readonly workspace_fileFeatures: (a: number, b: number, c: number) => void;
2293
2339
  readonly workspace_updateSettings: (a: number, b: number, c: number) => void;
2340
+ readonly workspace_registerProjectFolder: (a: number, b: number, c: number) => void;
2294
2341
  readonly workspace_openFile: (a: number, b: number, c: number) => void;
2295
2342
  readonly workspace_getFileContent: (a: number, b: number, c: number) => void;
2296
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) {
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","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.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"]}