@biomejs/wasm-nodejs 2.0.0-beta.4 → 2.0.0-beta.6

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
@@ -40,7 +40,7 @@ interface Configuration {
40
40
  /**
41
41
  * A list of paths to other JSON files, used to extends the current configuration.
42
42
  */
43
- extends?: string[];
43
+ extends?: Extends;
44
44
  /**
45
45
  * The configuration of the filesystem
46
46
  */
@@ -127,7 +127,28 @@ interface CssConfiguration {
127
127
  */
128
128
  parser?: CssParserConfiguration;
129
129
  }
130
+ type Extends = string[] | string;
130
131
  interface FilesConfiguration {
132
+ /**
133
+ * Set of file and folder names that should be unconditionally ignored by Biome's scanner.
134
+
135
+ Biome maintains an internal list of default ignore entries, which is based on user feedback and which may change in any release. This setting allows overriding this internal list completely.
136
+
137
+ This is considered an advanced feature that users _should_ not need to tweak themselves, but they can as a last resort. This setting can only be configured in root configurations, and is ignored in nested configs.
138
+
139
+ Entries must be file or folder *names*. Specific paths and globs are not supported.
140
+
141
+ Examples where this may be useful:
142
+
143
+ ```jsonc { "files": { "experimentalScannerIgnores": [ // You almost certainly don't want to scan your `.git` // folder, which is why it's already ignored by default: ".git",
144
+
145
+ // But the scanner does scan `node_modules` by default. If // you *really* don't want this, you can ignore it like // this: "node_modules",
146
+
147
+ // But it's probably better to ignore a specific dependency. // For instance, one that happens to be particularly slow to // scan: "RedisCommander.d.ts", ], } } ```
148
+
149
+ Please be aware that rules relying on the module graph or type inference information may be negatively affected if dependencies of your project aren't (fully) scanned.
150
+ */
151
+ experimentalScannerIgnores?: string[];
131
152
  /**
132
153
  * Tells Biome to not emit diagnostics when handling files that doesn't know
133
154
  */
@@ -673,6 +694,10 @@ interface OverridePattern {
673
694
  * Specific configuration for the CSS language
674
695
  */
675
696
  css?: CssConfiguration;
697
+ /**
698
+ * Specific configuration for the filesystem
699
+ */
700
+ files?: OverrideFilesConfiguration;
676
701
  /**
677
702
  * Specific configuration for the Json language
678
703
  */
@@ -705,6 +730,10 @@ interface OverridePattern {
705
730
  * Specific configuration for the Json language
706
731
  */
707
732
  linter?: OverrideLinterConfiguration;
733
+ /**
734
+ * Specific configuration for additional plugins
735
+ */
736
+ plugins?: Plugins;
708
737
  }
709
738
  type PluginConfiguration = string;
710
739
  type VcsClientKind = "git";
@@ -760,6 +789,12 @@ interface OverrideAssistConfiguration {
760
789
  */
761
790
  enabled?: Bool;
762
791
  }
792
+ interface OverrideFilesConfiguration {
793
+ /**
794
+ * File size limit in bytes
795
+ */
796
+ maxSize?: MaxSize;
797
+ }
763
798
  interface OverrideFormatterConfiguration {
764
799
  /**
765
800
  * The attribute position style.
@@ -980,10 +1015,18 @@ interface Complexity {
980
1015
  * Disallow unclear usage of consecutive space characters in regular expression literals
981
1016
  */
982
1017
  noAdjacentSpacesInRegex?: RuleFixConfiguration_for_Null;
1018
+ /**
1019
+ * Disallow the use of arguments.
1020
+ */
1021
+ noArguments?: RuleConfiguration_for_Null;
983
1022
  /**
984
1023
  * Disallow primitive type aliases and misleading types.
985
1024
  */
986
1025
  noBannedTypes?: RuleFixConfiguration_for_Null;
1026
+ /**
1027
+ * Disallow comma operator.
1028
+ */
1029
+ noCommaOperator?: RuleConfiguration_for_Null;
987
1030
  /**
988
1031
  * Disallow empty type parameters in type aliases and interfaces.
989
1032
  */
@@ -1000,6 +1043,10 @@ interface Complexity {
1000
1043
  * Disallow unnecessary boolean casts
1001
1044
  */
1002
1045
  noExtraBooleanCast?: RuleFixConfiguration_for_Null;
1046
+ /**
1047
+ * Disallow to use unnecessary callback on flatMap.
1048
+ */
1049
+ noFlatMapIdentity?: RuleFixConfiguration_for_Null;
1003
1050
  /**
1004
1051
  * Prefer for...of statement instead of Array.forEach.
1005
1052
  */
@@ -1020,6 +1067,10 @@ interface Complexity {
1020
1067
  * Disallow unnecessary constructors.
1021
1068
  */
1022
1069
  noUselessConstructor?: RuleFixConfiguration_for_Null;
1070
+ /**
1071
+ * Avoid using unnecessary continue.
1072
+ */
1073
+ noUselessContinue?: RuleFixConfiguration_for_Null;
1023
1074
  /**
1024
1075
  * Disallow empty exports that don't change anything in a module file.
1025
1076
  */
@@ -1076,10 +1127,6 @@ interface Complexity {
1076
1127
  * Disallow the use of void operators, which is not a familiar operator.
1077
1128
  */
1078
1129
  noVoid?: RuleConfiguration_for_Null;
1079
- /**
1080
- * Disallow with statements in non-strict contexts.
1081
- */
1082
- noWith?: RuleConfiguration_for_Null;
1083
1130
  /**
1084
1131
  * It enables the recommended rules for this group
1085
1132
  */
@@ -1100,6 +1147,10 @@ interface Complexity {
1100
1147
  * Enforce the usage of a literal access to properties over computed property access.
1101
1148
  */
1102
1149
  useLiteralKeys?: RuleFixConfiguration_for_Null;
1150
+ /**
1151
+ * Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
1152
+ */
1153
+ useNumericLiterals?: RuleFixConfiguration_for_Null;
1103
1154
  /**
1104
1155
  * Enforce using concise optional chain instead of chained logical expressions.
1105
1156
  */
@@ -1150,10 +1201,6 @@ interface Correctness {
1150
1201
  * Disallows empty destructuring patterns.
1151
1202
  */
1152
1203
  noEmptyPattern?: RuleConfiguration_for_Null;
1153
- /**
1154
- * Disallow to use unnecessary callback on flatMap.
1155
- */
1156
- noFlatMapIdentity?: RuleFixConfiguration_for_Null;
1157
1204
  /**
1158
1205
  * Disallow calling global object properties as functions
1159
1206
  */
@@ -1302,10 +1349,6 @@ interface Correctness {
1302
1349
  * Disallow unused variables.
1303
1350
  */
1304
1351
  noUnusedVariables?: RuleFixConfiguration_for_NoUnusedVariablesOptions;
1305
- /**
1306
- * Avoid using unnecessary continue.
1307
- */
1308
- noUselessContinue?: RuleFixConfiguration_for_Null;
1309
1352
  /**
1310
1353
  * This rules prevents void elements (AKA self-closing elements) from having children.
1311
1354
  */
@@ -1318,10 +1361,6 @@ interface Correctness {
1318
1361
  * It enables the recommended rules for this group
1319
1362
  */
1320
1363
  recommended?: boolean;
1321
- /**
1322
- * Disallow Array constructors.
1323
- */
1324
- useArrayLiterals?: RuleFixConfiguration_for_Null;
1325
1364
  /**
1326
1365
  * Enforce all dependencies are correctly specified in a React hook.
1327
1366
  */
@@ -1346,6 +1385,10 @@ interface Correctness {
1346
1385
  * Enforce "for" loop update clause moving the counter in the right direction.
1347
1386
  */
1348
1387
  useValidForDirection?: RuleConfiguration_for_Null;
1388
+ /**
1389
+ * This rule checks that the result of a typeof expression is compared to a valid value.
1390
+ */
1391
+ useValidTypeof?: RuleFixConfiguration_for_Null;
1349
1392
  /**
1350
1393
  * Require generator functions to contain yield.
1351
1394
  */
@@ -1384,6 +1427,10 @@ interface Nursery {
1384
1427
  * Disallow the use of the !important style.
1385
1428
  */
1386
1429
  noImportantStyles?: RuleFixConfiguration_for_Null;
1430
+ /**
1431
+ * Disallows defining React components inside other components.
1432
+ */
1433
+ noNestedComponentDefinitions?: RuleConfiguration_for_Null;
1387
1434
  /**
1388
1435
  * Disallow use event handlers on non-interactive elements.
1389
1436
  */
@@ -1392,6 +1439,10 @@ interface Nursery {
1392
1439
  * Disallow the use of process global.
1393
1440
  */
1394
1441
  noProcessGlobal?: RuleFixConfiguration_for_Null;
1442
+ /**
1443
+ * Disallow assigning to React component props.
1444
+ */
1445
+ noReactPropAssign?: RuleConfiguration_for_Null;
1395
1446
  /**
1396
1447
  * Disallow the use of configured elements.
1397
1448
  */
@@ -1436,10 +1487,18 @@ interface Nursery {
1436
1487
  * It enables the recommended rules for this group
1437
1488
  */
1438
1489
  recommended?: boolean;
1490
+ /**
1491
+ * Enforce that getters and setters for the same property are adjacent in class and object definitions.
1492
+ */
1493
+ useAdjacentGetterSetter?: RuleConfiguration_for_Null;
1439
1494
  /**
1440
1495
  * Require the consistent declaration of object literals. Defaults to explicit definitions.
1441
1496
  */
1442
1497
  useConsistentObjectDefinition?: RuleFixConfiguration_for_UseConsistentObjectDefinitionOptions;
1498
+ /**
1499
+ * Use static Response methods instead of new Response() constructor when possible.
1500
+ */
1501
+ useConsistentResponse?: RuleFixConfiguration_for_Null;
1443
1502
  /**
1444
1503
  * Require switch-case statements to be exhaustive.
1445
1504
  */
@@ -1460,10 +1519,18 @@ interface Nursery {
1460
1519
  * Ensure the preconnect attribute is used when using Google Fonts.
1461
1520
  */
1462
1521
  useGoogleFontPreconnect?: RuleFixConfiguration_for_Null;
1522
+ /**
1523
+ * Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.
1524
+ */
1525
+ useIndexOf?: RuleFixConfiguration_for_Null;
1463
1526
  /**
1464
1527
  * Enforce consistent return values in iterable callbacks.
1465
1528
  */
1466
1529
  useIterableCallbackReturn?: RuleConfiguration_for_Null;
1530
+ /**
1531
+ * Enforces the use of with { type: "json" } for JSON module imports.
1532
+ */
1533
+ useJsonImportAttribute?: RuleFixConfiguration_for_Null;
1467
1534
  /**
1468
1535
  * Enforce specifying the name of GraphQL operations.
1469
1536
  */
@@ -1476,6 +1543,10 @@ interface Nursery {
1476
1543
  * Enforce the use of numeric separators in numeric literals.
1477
1544
  */
1478
1545
  useNumericSeparators?: RuleFixConfiguration_for_Null;
1546
+ /**
1547
+ * Prefer object spread over Object.assign() when constructing new objects.
1548
+ */
1549
+ useObjectSpread?: RuleFixConfiguration_for_Null;
1479
1550
  /**
1480
1551
  * Enforce the consistent use of the radix argument when using parseInt().
1481
1552
  */
@@ -1492,6 +1563,10 @@ interface Nursery {
1492
1563
  * Require a description parameter for the Symbol().
1493
1564
  */
1494
1565
  useSymbolDescription?: RuleConfiguration_for_Null;
1566
+ /**
1567
+ * Prevent the usage of static string literal id attribute on elements.
1568
+ */
1569
+ useUniqueElementIds?: RuleConfiguration_for_Null;
1495
1570
  }
1496
1571
  interface Performance {
1497
1572
  /**
@@ -1514,6 +1589,10 @@ interface Performance {
1514
1589
  * Prevent usage of \<img> element in a Next.js project.
1515
1590
  */
1516
1591
  noImgElement?: RuleConfiguration_for_Null;
1592
+ /**
1593
+ * Disallow the use of namespace imports.
1594
+ */
1595
+ noNamespaceImport?: RuleConfiguration_for_Null;
1517
1596
  /**
1518
1597
  * Avoid re-export all.
1519
1598
  */
@@ -1550,14 +1629,6 @@ interface Security {
1550
1629
  recommended?: boolean;
1551
1630
  }
1552
1631
  interface Style {
1553
- /**
1554
- * Disallow the use of arguments.
1555
- */
1556
- noArguments?: RuleConfiguration_for_Null;
1557
- /**
1558
- * Disallow comma operator.
1559
- */
1560
- noCommaOperator?: RuleConfiguration_for_Null;
1561
1632
  /**
1562
1633
  * Disallow use of CommonJs module system in favor of ESM style imports.
1563
1634
  */
@@ -1598,10 +1669,6 @@ interface Style {
1598
1669
  * Disallow the use of TypeScript's namespaces.
1599
1670
  */
1600
1671
  noNamespace?: RuleConfiguration_for_Null;
1601
- /**
1602
- * Disallow the use of namespace imports.
1603
- */
1604
- noNamespaceImport?: RuleConfiguration_for_Null;
1605
1672
  /**
1606
1673
  * Disallow negation in the condition of an if statement if it has an else clause.
1607
1674
  */
@@ -1666,6 +1733,10 @@ interface Style {
1666
1733
  * It enables the recommended rules for this group
1667
1734
  */
1668
1735
  recommended?: boolean;
1736
+ /**
1737
+ * Disallow Array constructors.
1738
+ */
1739
+ useArrayLiterals?: RuleFixConfiguration_for_Null;
1669
1740
  /**
1670
1741
  * Enforce the use of as const over literal type and type annotation.
1671
1742
  */
@@ -1774,10 +1845,6 @@ interface Style {
1774
1845
  * Use the Number properties instead of global ones.
1775
1846
  */
1776
1847
  useNumberNamespace?: RuleFixConfiguration_for_Null;
1777
- /**
1778
- * Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
1779
- */
1780
- useNumericLiterals?: RuleFixConfiguration_for_Null;
1781
1848
  /**
1782
1849
  * Prevent extra closing tags for components without children.
1783
1850
  */
@@ -2088,6 +2155,10 @@ interface Suspicious {
2088
2155
  * Disallow the use of var
2089
2156
  */
2090
2157
  noVar?: RuleFixConfiguration_for_Null;
2158
+ /**
2159
+ * Disallow with statements in non-strict contexts.
2160
+ */
2161
+ noWith?: RuleConfiguration_for_Null;
2091
2162
  /**
2092
2163
  * It enables the recommended rules for this group
2093
2164
  */
@@ -2136,10 +2207,6 @@ interface Suspicious {
2136
2207
  * Enforce the use of the directive "use strict" in script files.
2137
2208
  */
2138
2209
  useStrictMode?: RuleFixConfiguration_for_Null;
2139
- /**
2140
- * This rule checks that the result of a typeof expression is compared to a valid value.
2141
- */
2142
- useValidTypeof?: RuleFixConfiguration_for_Null;
2143
2210
  }
2144
2211
  type RuleAssistPlainConfiguration = "off" | "on";
2145
2212
  interface RuleAssistWithOptions_for_Options {
@@ -3118,16 +3185,20 @@ type Category =
3118
3185
  | "lint/a11y/useValidAutocomplete"
3119
3186
  | "lint/a11y/useValidLang"
3120
3187
  | "lint/complexity/noAdjacentSpacesInRegex"
3188
+ | "lint/complexity/noArguments"
3121
3189
  | "lint/complexity/noBannedTypes"
3190
+ | "lint/complexity/noCommaOperator"
3122
3191
  | "lint/complexity/noEmptyTypeParameters"
3123
3192
  | "lint/complexity/noExcessiveCognitiveComplexity"
3124
3193
  | "lint/complexity/noExcessiveNestedTestSuites"
3125
3194
  | "lint/complexity/noExtraBooleanCast"
3195
+ | "lint/complexity/noFlatMapIdentity"
3126
3196
  | "lint/complexity/noForEach"
3127
3197
  | "lint/complexity/noStaticOnlyClass"
3128
3198
  | "lint/complexity/noThisInStatic"
3129
3199
  | "lint/complexity/noUselessCatch"
3130
3200
  | "lint/complexity/noUselessConstructor"
3201
+ | "lint/complexity/noUselessContinue"
3131
3202
  | "lint/complexity/noUselessEmptyExport"
3132
3203
  | "lint/complexity/noUselessEscapeInRegex"
3133
3204
  | "lint/complexity/noUselessFragments"
@@ -3142,11 +3213,11 @@ type Category =
3142
3213
  | "lint/complexity/noUselessTypeConstraint"
3143
3214
  | "lint/complexity/noUselessUndefinedInitialization"
3144
3215
  | "lint/complexity/noVoid"
3145
- | "lint/complexity/noWith"
3146
3216
  | "lint/complexity/useArrowFunction"
3147
3217
  | "lint/complexity/useDateNow"
3148
3218
  | "lint/complexity/useFlatMap"
3149
3219
  | "lint/complexity/useLiteralKeys"
3220
+ | "lint/complexity/useNumericLiterals"
3150
3221
  | "lint/complexity/useOptionalChain"
3151
3222
  | "lint/complexity/useRegexLiterals"
3152
3223
  | "lint/complexity/useSimpleNumberKeys"
@@ -3159,7 +3230,6 @@ type Category =
3159
3230
  | "lint/correctness/noConstructorReturn"
3160
3231
  | "lint/correctness/noEmptyCharacterClassInRegex"
3161
3232
  | "lint/correctness/noEmptyPattern"
3162
- | "lint/correctness/noFlatMapIdentity"
3163
3233
  | "lint/correctness/noGlobalObjectCalls"
3164
3234
  | "lint/correctness/noInnerDeclarations"
3165
3235
  | "lint/correctness/noInvalidBuiltinInstantiation"
@@ -3200,16 +3270,15 @@ type Category =
3200
3270
  | "lint/correctness/noUnusedLabels"
3201
3271
  | "lint/correctness/noUnusedPrivateClassMembers"
3202
3272
  | "lint/correctness/noUnusedVariables"
3203
- | "lint/correctness/noUselessContinue"
3204
3273
  | "lint/correctness/noVoidElementsWithChildren"
3205
3274
  | "lint/correctness/noVoidTypeReturn"
3206
- | "lint/correctness/useArrayLiterals"
3207
3275
  | "lint/correctness/useExhaustiveDependencies"
3208
3276
  | "lint/correctness/useHookAtTopLevel"
3209
3277
  | "lint/correctness/useImportExtensions"
3210
3278
  | "lint/correctness/useIsNan"
3211
3279
  | "lint/correctness/useJsxKeyInIterable"
3212
3280
  | "lint/correctness/useValidForDirection"
3281
+ | "lint/correctness/useValidTypeof"
3213
3282
  | "lint/correctness/useYield"
3214
3283
  | "lint/nursery/colorNoInvalidHex"
3215
3284
  | "lint/nursery/noAwaitInLoop"
@@ -3229,8 +3298,10 @@ type Category =
3229
3298
  | "lint/nursery/noInvalidGridAreas"
3230
3299
  | "lint/nursery/noInvalidPositionAtImportRule"
3231
3300
  | "lint/nursery/noMissingGenericFamilyKeyword"
3301
+ | "lint/nursery/noNestedComponentDefinitions"
3232
3302
  | "lint/nursery/noNoninteractiveElementInteractions"
3233
3303
  | "lint/nursery/noProcessGlobal"
3304
+ | "lint/nursery/noReactPropAssign"
3234
3305
  | "lint/nursery/noReactSpecificProps"
3235
3306
  | "lint/nursery/noRestrictedElements"
3236
3307
  | "lint/nursery/noSecrets"
@@ -3251,8 +3322,10 @@ type Category =
3251
3322
  | "lint/nursery/noUselessBackrefInRegex"
3252
3323
  | "lint/nursery/noUselessEscapeInString"
3253
3324
  | "lint/nursery/noUselessUndefined"
3325
+ | "lint/nursery/useAdjacentGetterSetter"
3254
3326
  | "lint/nursery/useBiomeSuppressionComment"
3255
3327
  | "lint/nursery/useConsistentObjectDefinition"
3328
+ | "lint/nursery/useConsistentResponse"
3256
3329
  | "lint/nursery/useExhaustiveSwitchCases"
3257
3330
  | "lint/nursery/useExplicitFunctionReturnType"
3258
3331
  | "lint/nursery/useExplicitType"
@@ -3260,29 +3333,32 @@ type Category =
3260
3333
  | "lint/nursery/useForComponent"
3261
3334
  | "lint/nursery/useGoogleFontPreconnect"
3262
3335
  | "lint/nursery/useImportRestrictions"
3336
+ | "lint/nursery/useIndexOf"
3263
3337
  | "lint/nursery/useIterableCallbackReturn"
3338
+ | "lint/nursery/useJsonImportAttribute"
3264
3339
  | "lint/nursery/useJsxCurlyBraceConvention"
3265
3340
  | "lint/nursery/useNamedOperation"
3266
3341
  | "lint/nursery/useNamingConvention"
3267
3342
  | "lint/nursery/useNumericSeparators"
3343
+ | "lint/nursery/useObjectSpread"
3268
3344
  | "lint/nursery/useParseIntRadix"
3269
3345
  | "lint/nursery/useSingleJsDocAsterisk"
3270
3346
  | "lint/nursery/useSortedClasses"
3271
3347
  | "lint/nursery/useSortedProperties"
3272
3348
  | "lint/nursery/useSymbolDescription"
3349
+ | "lint/nursery/useUniqueElementIds"
3273
3350
  | "lint/performance/noAccumulatingSpread"
3274
3351
  | "lint/performance/noBarrelFile"
3275
3352
  | "lint/performance/noDelete"
3276
3353
  | "lint/performance/noDynamicNamespaceImportAccess"
3277
3354
  | "lint/performance/noImgElement"
3355
+ | "lint/performance/noNamespaceImport"
3278
3356
  | "lint/performance/noReExportAll"
3279
3357
  | "lint/performance/useTopLevelRegex"
3280
3358
  | "lint/security/noBlankTarget"
3281
3359
  | "lint/security/noDangerouslySetInnerHtml"
3282
3360
  | "lint/security/noDangerouslySetInnerHtmlWithChildren"
3283
3361
  | "lint/security/noGlobalEval"
3284
- | "lint/style/noArguments"
3285
- | "lint/style/noCommaOperator"
3286
3362
  | "lint/style/noCommonJs"
3287
3363
  | "lint/style/noDefaultExport"
3288
3364
  | "lint/style/noDescendingSpecificity"
@@ -3293,7 +3369,6 @@ type Category =
3293
3369
  | "lint/style/noImplicitBoolean"
3294
3370
  | "lint/style/noInferrableTypes"
3295
3371
  | "lint/style/noNamespace"
3296
- | "lint/style/noNamespaceImport"
3297
3372
  | "lint/style/noNegationElse"
3298
3373
  | "lint/style/noNestedTernary"
3299
3374
  | "lint/style/noNonNullAssertion"
@@ -3309,6 +3384,7 @@ type Category =
3309
3384
  | "lint/style/noUselessElse"
3310
3385
  | "lint/style/noValueAtRule"
3311
3386
  | "lint/style/noYodaExpression"
3387
+ | "lint/style/useArrayLiterals"
3312
3388
  | "lint/style/useAsConstAssertion"
3313
3389
  | "lint/style/useAtIndex"
3314
3390
  | "lint/style/useBlockStatements"
@@ -3336,7 +3412,6 @@ type Category =
3336
3412
  | "lint/style/useNodeAssertStrict"
3337
3413
  | "lint/style/useNodejsImportProtocol"
3338
3414
  | "lint/style/useNumberNamespace"
3339
- | "lint/style/useNumericLiterals"
3340
3415
  | "lint/style/useSelfClosingElements"
3341
3416
  | "lint/style/useShorthandArrayType"
3342
3417
  | "lint/style/useShorthandAssign"
@@ -3416,6 +3491,7 @@ type Category =
3416
3491
  | "lint/suspicious/noUnsafeDeclarationMerging"
3417
3492
  | "lint/suspicious/noUnsafeNegation"
3418
3493
  | "lint/suspicious/noVar"
3494
+ | "lint/suspicious/noWith"
3419
3495
  | "lint/suspicious/useAdjacentOverloadSignatures"
3420
3496
  | "lint/suspicious/useAwait"
3421
3497
  | "lint/suspicious/useDefaultSwitchClauseLast"
@@ -3427,7 +3503,6 @@ type Category =
3427
3503
  | "lint/suspicious/useNamespaceKeyword"
3428
3504
  | "lint/suspicious/useNumberToFixedDigitsArgument"
3429
3505
  | "lint/suspicious/useStrictMode"
3430
- | "lint/suspicious/useValidTypeof"
3431
3506
  | "assist/source/useSortedKeys"
3432
3507
  | "assist/source/useSortedProperties"
3433
3508
  | "assist/source/useSortedAttributes"
@@ -3538,6 +3613,10 @@ interface BacktraceSymbol {
3538
3613
  name?: string;
3539
3614
  }
3540
3615
  interface OpenProjectParams {
3616
+ /**
3617
+ * Whether the client wants to run only certain rules. This is needed to compute the kind of [ScanKind].
3618
+ */
3619
+ onlyRules?: RuleCode[];
3541
3620
  /**
3542
3621
  * Whether the folder should be opened as a project, even if no `biome.json` can be found.
3543
3622
  */
@@ -3546,7 +3625,23 @@ interface OpenProjectParams {
3546
3625
  * The path to open
3547
3626
  */
3548
3627
  path: BiomePath;
3628
+ /**
3629
+ * Whether the client wants to skip some lint rule. This is needed to compute the kind of [ScanKind].
3630
+ */
3631
+ skipRules?: RuleCode[];
3632
+ }
3633
+ type RuleCode = string;
3634
+ interface OpenProjectResult {
3635
+ /**
3636
+ * A unique identifier for this project
3637
+ */
3638
+ projectKey: ProjectKey;
3639
+ /**
3640
+ * How to scan this project
3641
+ */
3642
+ scanKind: ScanKind;
3549
3643
  }
3644
+ type ScanKind = "none" | "knownFiles" | "project";
3550
3645
  interface OpenFileParams {
3551
3646
  content: FileContent;
3552
3647
  documentFileSource?: DocumentFileSource;
@@ -3675,7 +3770,6 @@ interface PullDiagnosticsParams {
3675
3770
  skip?: RuleCode[];
3676
3771
  }
3677
3772
  type RuleCategories = RuleCategory[];
3678
- type RuleCode = string;
3679
3773
  type RuleCategory = "syntax" | "lint" | "action" | "transformation";
3680
3774
  interface PullDiagnosticsResult {
3681
3775
  diagnostics: Diagnostic[];
@@ -3851,7 +3945,7 @@ export class Workspace {
3851
3945
  constructor();
3852
3946
  fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
3853
3947
  updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
3854
- openProject(params: OpenProjectParams): ProjectKey;
3948
+ openProject(params: OpenProjectParams): OpenProjectResult;
3855
3949
  openFile(params: OpenFileParams): void;
3856
3950
  getFileContent(params: GetFileContentParams): string;
3857
3951
  getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
package/biome_wasm.js CHANGED
@@ -302,7 +302,7 @@ class Workspace {
302
302
  }
303
303
  /**
304
304
  * @param {OpenProjectParams} params
305
- * @returns {ProjectKey}
305
+ * @returns {OpenProjectResult}
306
306
  */
307
307
  openProject(params) {
308
308
  const ret = wasm.workspace_openProject(this.__wbg_ptr, params);
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Biome Developers and Contributors"
5
5
  ],
6
6
  "description": "WebAssembly bindings to the Biome workspace API",
7
- "version": "2.0.0-beta.4",
7
+ "version": "2.0.0-beta.6",
8
8
  "license": "MIT OR Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",