@biomejs/wasm-web 1.9.2 → 1.9.3

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
@@ -22,7 +22,13 @@ interface BiomePath {
22
22
  */
23
23
  was_written: boolean;
24
24
  }
25
- type FeatureKind = "Format" | "Lint" | "OrganizeImports" | "Search" | "Assists";
25
+ type FeatureKind =
26
+ | "Format"
27
+ | "Lint"
28
+ | "OrganizeImports"
29
+ | "Search"
30
+ | "Assists"
31
+ | "Debug";
26
32
  type FileKind = FileKind2[];
27
33
  type FileKind2 =
28
34
  | "Config"
@@ -30,15 +36,9 @@ type FileKind2 =
30
36
  | "Ignore"
31
37
  | "Inspectable"
32
38
  | "Handleable";
33
- interface SupportsFeatureResult {
34
- reason?: SupportKind;
35
- }
36
- type SupportKind =
37
- | "Supported"
38
- | "Ignored"
39
- | "Protected"
40
- | "FeatureNotEnabled"
41
- | "FileNotSupported";
39
+ interface FileFeaturesResult {
40
+ features_supported: {};
41
+ }
42
42
  interface UpdateSettingsParams {
43
43
  configuration: PartialConfiguration;
44
44
  gitignore_matches: string[];
@@ -1098,7 +1098,7 @@ interface Correctness {
1098
1098
  /**
1099
1099
  * Enforce all dependencies are correctly specified in a React hook.
1100
1100
  */
1101
- useExhaustiveDependencies?: RuleConfiguration_for_HooksOptions;
1101
+ useExhaustiveDependencies?: RuleConfiguration_for_UseExhaustiveDependenciesOptions;
1102
1102
  /**
1103
1103
  * Enforce that all React hooks are being called from the Top Level component functions.
1104
1104
  */
@@ -1133,6 +1133,10 @@ interface Nursery {
1133
1133
  * Disallow use of CommonJs module system in favor of ESM style imports.
1134
1134
  */
1135
1135
  noCommonJs?: RuleConfiguration_for_Null;
1136
+ /**
1137
+ * Disallow a lower specificity selector from coming after a higher specificity selector.
1138
+ */
1139
+ noDescendingSpecificity?: RuleConfiguration_for_Null;
1136
1140
  /**
1137
1141
  * Disallow duplicate custom properties within declaration blocks.
1138
1142
  */
@@ -1165,6 +1169,14 @@ interface Nursery {
1165
1169
  * Disallow missing var function for css variables.
1166
1170
  */
1167
1171
  noMissingVarFunction?: RuleConfiguration_for_Null;
1172
+ /**
1173
+ * Disallow nested ternary expressions.
1174
+ */
1175
+ noNestedTernary?: RuleConfiguration_for_Null;
1176
+ /**
1177
+ * Disallow octal escape sequences in string literals
1178
+ */
1179
+ noOctalEscape?: RuleConfiguration_for_Null;
1168
1180
  /**
1169
1181
  * Disallow the use of process.env.
1170
1182
  */
@@ -1189,6 +1201,10 @@ interface Nursery {
1189
1201
  * Enforce the use of String.slice() over String.substr() and String.substring().
1190
1202
  */
1191
1203
  noSubstr?: RuleFixConfiguration_for_Null;
1204
+ /**
1205
+ * Disallow template literal placeholder syntax in regular strings.
1206
+ */
1207
+ noTemplateCurlyInString?: RuleConfiguration_for_Null;
1192
1208
  /**
1193
1209
  * Disallow unknown pseudo-class selectors.
1194
1210
  */
@@ -1233,6 +1249,10 @@ interface Nursery {
1233
1249
  * Require specifying the reason argument when using @deprecated directive
1234
1250
  */
1235
1251
  useDeprecatedReason?: RuleConfiguration_for_Null;
1252
+ /**
1253
+ * Require explicit return types on functions and class methods.
1254
+ */
1255
+ useExplicitFunctionReturnType?: RuleConfiguration_for_Null;
1236
1256
  /**
1237
1257
  * Disallows package private imports.
1238
1258
  */
@@ -1864,9 +1884,9 @@ type RuleFixConfiguration_for_ValidAriaRoleOptions =
1864
1884
  type RuleConfiguration_for_ComplexityOptions =
1865
1885
  | RulePlainConfiguration
1866
1886
  | RuleWithOptions_for_ComplexityOptions;
1867
- type RuleConfiguration_for_HooksOptions =
1887
+ type RuleConfiguration_for_UseExhaustiveDependenciesOptions =
1868
1888
  | RulePlainConfiguration
1869
- | RuleWithOptions_for_HooksOptions;
1889
+ | RuleWithOptions_for_UseExhaustiveDependenciesOptions;
1870
1890
  type RuleConfiguration_for_DeprecatedHooksOptions =
1871
1891
  | RulePlainConfiguration
1872
1892
  | RuleWithOptions_for_DeprecatedHooksOptions;
@@ -1982,7 +2002,7 @@ interface RuleWithOptions_for_ComplexityOptions {
1982
2002
  */
1983
2003
  options: ComplexityOptions;
1984
2004
  }
1985
- interface RuleWithOptions_for_HooksOptions {
2005
+ interface RuleWithOptions_for_UseExhaustiveDependenciesOptions {
1986
2006
  /**
1987
2007
  * The severity of the emitted diagnostics by the rule
1988
2008
  */
@@ -1990,7 +2010,7 @@ interface RuleWithOptions_for_HooksOptions {
1990
2010
  /**
1991
2011
  * Rule's options
1992
2012
  */
1993
- options: HooksOptions;
2013
+ options: UseExhaustiveDependenciesOptions;
1994
2014
  }
1995
2015
  interface RuleWithOptions_for_DeprecatedHooksOptions {
1996
2016
  /**
@@ -2171,15 +2191,15 @@ interface NoLabelWithoutControlOptions {
2171
2191
  /**
2172
2192
  * Array of component names that should be considered the same as an `input` element.
2173
2193
  */
2174
- inputComponents: string[];
2194
+ inputComponents?: string[];
2175
2195
  /**
2176
2196
  * Array of attributes that should be treated as the `label` accessible text content.
2177
2197
  */
2178
- labelAttributes: string[];
2198
+ labelAttributes?: string[];
2179
2199
  /**
2180
2200
  * Array of component names that should be considered the same as a `label` element.
2181
2201
  */
2182
- labelComponents: string[];
2202
+ labelComponents?: string[];
2183
2203
  }
2184
2204
  interface ValidAriaRoleOptions {
2185
2205
  allowInvalidRoles: string[];
@@ -2191,11 +2211,15 @@ interface ComplexityOptions {
2191
2211
  */
2192
2212
  maxAllowedComplexity: number;
2193
2213
  }
2194
- interface HooksOptions {
2214
+ interface UseExhaustiveDependenciesOptions {
2195
2215
  /**
2196
2216
  * List of hooks of which the dependencies should be validated.
2197
2217
  */
2198
- hooks: Hook[];
2218
+ hooks?: Hook[];
2219
+ /**
2220
+ * Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to true.
2221
+ */
2222
+ reportUnnecessaryDependencies?: boolean;
2199
2223
  }
2200
2224
  interface DeprecatedHooksOptions {}
2201
2225
  interface UseImportExtensionsOptions {
@@ -2433,7 +2457,8 @@ type DocumentFileSource =
2433
2457
  | { Json: JsonFileSource }
2434
2458
  | { Css: CssFileSource }
2435
2459
  | { Graphql: GraphqlFileSource }
2436
- | { Html: HtmlFileSource };
2460
+ | { Html: HtmlFileSource }
2461
+ | { Grit: GritFileSource };
2437
2462
  interface JsFileSource {
2438
2463
  /**
2439
2464
  * Used to mark if the source is being used for an Astro, Svelte or Vue file
@@ -2457,6 +2482,9 @@ interface GraphqlFileSource {
2457
2482
  interface HtmlFileSource {
2458
2483
  variant: HtmlVariant;
2459
2484
  }
2485
+ interface GritFileSource {
2486
+ variant: GritVariant;
2487
+ }
2460
2488
  type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
2461
2489
  type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
2462
2490
  type ModuleKind = "Script" | "Module";
@@ -2465,6 +2493,7 @@ type LanguageVersion = "ES2022" | "ESNext";
2465
2493
  type CssVariant = "Standard";
2466
2494
  type GraphqlVariant = "Standard";
2467
2495
  type HtmlVariant = "Standard" | "Astro";
2496
+ type GritVariant = "Standard";
2468
2497
  interface ChangeFileParams {
2469
2498
  content: string;
2470
2499
  path: BiomePath;
@@ -2650,6 +2679,7 @@ type Category =
2650
2679
  | "lint/nursery/noColorInvalidHex"
2651
2680
  | "lint/nursery/noCommonJs"
2652
2681
  | "lint/nursery/noConsole"
2682
+ | "lint/nursery/noDescendingSpecificity"
2653
2683
  | "lint/nursery/noDoneCallback"
2654
2684
  | "lint/nursery/noDuplicateAtImportRules"
2655
2685
  | "lint/nursery/noDuplicateCustomProperties"
@@ -2664,15 +2694,18 @@ type Category =
2664
2694
  | "lint/nursery/noInvalidPositionAtImportRule"
2665
2695
  | "lint/nursery/noIrregularWhitespace"
2666
2696
  | "lint/nursery/noMissingGenericFamilyKeyword"
2697
+ | "lint/nursery/noMissingVarFunction"
2698
+ | "lint/nursery/noNestedTernary"
2699
+ | "lint/nursery/noOctalEscape"
2667
2700
  | "lint/nursery/noProcessEnv"
2668
2701
  | "lint/nursery/noReactSpecificProps"
2669
- | "lint/nursery/noMissingVarFunction"
2670
2702
  | "lint/nursery/noRestrictedImports"
2671
2703
  | "lint/nursery/noRestrictedTypes"
2672
2704
  | "lint/nursery/noSecrets"
2673
2705
  | "lint/nursery/noShorthandPropertyOverrides"
2674
2706
  | "lint/nursery/noStaticElementInteractions"
2675
2707
  | "lint/nursery/noSubstr"
2708
+ | "lint/nursery/noTemplateCurlyInString"
2676
2709
  | "lint/nursery/noUndeclaredDependencies"
2677
2710
  | "lint/nursery/noUnknownFunction"
2678
2711
  | "lint/nursery/noUnknownMediaFeatureName"
@@ -2693,6 +2726,7 @@ type Category =
2693
2726
  | "lint/nursery/useConsistentCurlyBraces"
2694
2727
  | "lint/nursery/useConsistentMemberAccessibility"
2695
2728
  | "lint/nursery/useDeprecatedReason"
2729
+ | "lint/nursery/useExplicitFunctionReturnType"
2696
2730
  | "lint/nursery/useImportRestrictions"
2697
2731
  | "lint/nursery/useJsxCurlyBraceConvention"
2698
2732
  | "lint/nursery/useSortedClasses"
@@ -3074,9 +3108,9 @@ export class Workspace {
3074
3108
  constructor();
3075
3109
  /**
3076
3110
  * @param {SupportsFeatureParams} params
3077
- * @returns {SupportsFeatureResult}
3111
+ * @returns {FileFeaturesResult}
3078
3112
  */
3079
- fileFeatures(params: SupportsFeatureParams): SupportsFeatureResult;
3113
+ fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3080
3114
  /**
3081
3115
  * @param {UpdateSettingsParams} params
3082
3116
  */
package/biome_wasm.js CHANGED
@@ -316,7 +316,7 @@ export class Workspace {
316
316
  }
317
317
  /**
318
318
  * @param {SupportsFeatureParams} params
319
- * @returns {SupportsFeatureResult}
319
+ * @returns {FileFeaturesResult}
320
320
  */
321
321
  fileFeatures(params) {
322
322
  try {
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Biome Developers and Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings to the Biome workspace API",
8
- "version": "1.9.2",
8
+ "version": "1.9.3",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",