oxlint 1.77.0 → 1.78.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/configuration_schema.json +242 -8
- package/dist/bindings.js +327 -316
- package/dist/index.d.ts +71 -4
- package/dist/lint.js +773 -710
- package/dist/plugins-dev.d.ts +1 -1
- package/package.json +20 -20
package/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,18 @@ type ExportsStyleMode = "module.exports" | "exports";
|
|
|
156
156
|
type HandleCallbackErrConfig = string;
|
|
157
157
|
type NoMixedRequiresConfig = boolean | NoMixedRequiresOptions;
|
|
158
158
|
type ShorthandType = "always" | "methods" | "properties" | "consistent" | "consistent-as-needed" | "never";
|
|
159
|
+
/**
|
|
160
|
+
* Enforces consistent grouping of variable declarations.
|
|
161
|
+
*/
|
|
162
|
+
type OneVar = OneVarConfig;
|
|
163
|
+
/**
|
|
164
|
+
* Configuration accepted by the `one-var` rule.
|
|
165
|
+
*/
|
|
166
|
+
type OneVarConfig = OneVarMode | OneVarOptions;
|
|
167
|
+
/**
|
|
168
|
+
* Controls how variable declarators are grouped into declarations.
|
|
169
|
+
*/
|
|
170
|
+
type OneVarMode = "always" | "never" | "consecutive";
|
|
159
171
|
type Destructuring = "any" | "all";
|
|
160
172
|
type PreferDestructuringOption = PreferDestructuringTargetOption | PreferDestructuringAssignmentConfig;
|
|
161
173
|
type TerminationMethod = string | string[];
|
|
@@ -203,9 +215,7 @@ type ImportKind = "none" | "all" | "multiple" | "single";
|
|
|
203
215
|
type SortOrder = "desc" | "asc";
|
|
204
216
|
type ArrayOption = "array" | "array-simple" | "generic";
|
|
205
217
|
type ReadonlyArrayOption = "array" | "array-simple" | "generic";
|
|
206
|
-
type DirectiveConfigSchema = boolean | RequireDescription |
|
|
207
|
-
descriptionFormat?: string;
|
|
208
|
-
};
|
|
218
|
+
type DirectiveConfigSchema = boolean | RequireDescription | DescriptionFormatConfig;
|
|
209
219
|
type RequireDescription = "allow-with-description";
|
|
210
220
|
type ClassLiteralPropertyStyleOption = "fields" | "getters";
|
|
211
221
|
type PreferGenericType = "constructor" | "type-annotation";
|
|
@@ -948,6 +958,7 @@ interface DummyRuleMap {
|
|
|
948
958
|
"jsdoc/check-tag-names"?: RuleNoConfig | [AllowWarnDeny, CheckTagNamesConfig];
|
|
949
959
|
"jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
|
|
950
960
|
"jsdoc/implements-on-classes"?: RuleNoConfig;
|
|
961
|
+
"jsdoc/no-blank-blocks"?: RuleNoConfig | [AllowWarnDeny, NoBlankBlocks];
|
|
951
962
|
"jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
|
|
952
963
|
"jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
|
|
953
964
|
"jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
|
|
@@ -967,7 +978,7 @@ interface DummyRuleMap {
|
|
|
967
978
|
"jsdoc/require-yields-type"?: RuleNoConfig;
|
|
968
979
|
"jsx-a11y/alt-text"?: RuleNoConfig | [AllowWarnDeny, AltTextConfigSchema];
|
|
969
980
|
"jsx-a11y/anchor-ambiguous-text"?: RuleNoConfig | [AllowWarnDeny, AnchorAmbiguousTextConfig];
|
|
970
|
-
"jsx-a11y/anchor-has-content"?: RuleNoConfig;
|
|
981
|
+
"jsx-a11y/anchor-has-content"?: RuleNoConfig | [AllowWarnDeny, AnchorHasContentConfig];
|
|
971
982
|
"jsx-a11y/anchor-is-valid"?: RuleNoConfig | [AllowWarnDeny, AnchorIsValidConfig];
|
|
972
983
|
"jsx-a11y/aria-activedescendant-has-tabindex"?: RuleNoConfig;
|
|
973
984
|
"jsx-a11y/aria-props"?: RuleNoConfig;
|
|
@@ -1167,6 +1178,7 @@ interface DummyRuleMap {
|
|
|
1167
1178
|
"node/no-sync"?: RuleNoConfig | [AllowWarnDeny, NoSyncConfig];
|
|
1168
1179
|
"node/no-top-level-await"?: RuleNoConfig | [AllowWarnDeny, NoTopLevelAwaitConfig];
|
|
1169
1180
|
"object-shorthand"?: RuleNoConfig | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions];
|
|
1181
|
+
"one-var"?: RuleNoConfig | [AllowWarnDeny, OneVar];
|
|
1170
1182
|
"operator-assignment"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever];
|
|
1171
1183
|
"oxc/approx-constant"?: RuleNoConfig;
|
|
1172
1184
|
"oxc/bad-array-method-on-arguments"?: RuleNoConfig;
|
|
@@ -2463,6 +2475,12 @@ interface EmptyTagsConfig {
|
|
|
2463
2475
|
*/
|
|
2464
2476
|
tags?: string[];
|
|
2465
2477
|
}
|
|
2478
|
+
interface NoBlankBlocks {
|
|
2479
|
+
/**
|
|
2480
|
+
* Whether to automatically remove blank JSDoc blocks.
|
|
2481
|
+
*/
|
|
2482
|
+
enableFixer?: boolean;
|
|
2483
|
+
}
|
|
2466
2484
|
interface NoDefaultsConfig {
|
|
2467
2485
|
/**
|
|
2468
2486
|
* If true, report the presence of optional param names (square brackets) on `@param` tags.
|
|
@@ -2605,6 +2623,12 @@ interface AnchorAmbiguousTextConfig {
|
|
|
2605
2623
|
*/
|
|
2606
2624
|
words?: string[];
|
|
2607
2625
|
}
|
|
2626
|
+
interface AnchorHasContentConfig {
|
|
2627
|
+
/**
|
|
2628
|
+
* Additional custom component names to treat as anchor elements.
|
|
2629
|
+
*/
|
|
2630
|
+
components?: string[];
|
|
2631
|
+
}
|
|
2608
2632
|
interface AnchorIsValidConfig {
|
|
2609
2633
|
/**
|
|
2610
2634
|
* Sub-rule aspects to run.
|
|
@@ -4118,6 +4142,46 @@ interface ObjectShorthandOptions {
|
|
|
4118
4142
|
ignoreConstructors?: boolean;
|
|
4119
4143
|
methodsIgnorePattern?: string;
|
|
4120
4144
|
}
|
|
4145
|
+
/**
|
|
4146
|
+
* Options for configuring declaration grouping by kind or initialization state.
|
|
4147
|
+
*
|
|
4148
|
+
* `initialized` and `uninitialized` take precedence over the per-kind option for the
|
|
4149
|
+
* corresponding declarators.
|
|
4150
|
+
*/
|
|
4151
|
+
interface OneVarOptions {
|
|
4152
|
+
/**
|
|
4153
|
+
* Controls grouping for `await using` declarations.
|
|
4154
|
+
*/
|
|
4155
|
+
awaitUsing?: OneVarMode;
|
|
4156
|
+
/**
|
|
4157
|
+
* Controls grouping for `const` declarations.
|
|
4158
|
+
*/
|
|
4159
|
+
const?: OneVarMode;
|
|
4160
|
+
/**
|
|
4161
|
+
* Controls grouping for initialized declarators, overriding per-kind options.
|
|
4162
|
+
*/
|
|
4163
|
+
initialized?: OneVarMode;
|
|
4164
|
+
/**
|
|
4165
|
+
* Controls grouping for `let` declarations.
|
|
4166
|
+
*/
|
|
4167
|
+
let?: OneVarMode;
|
|
4168
|
+
/**
|
|
4169
|
+
* Keeps direct `require(...)` initializers separate from other initialized declarations.
|
|
4170
|
+
*/
|
|
4171
|
+
separateRequires?: boolean;
|
|
4172
|
+
/**
|
|
4173
|
+
* Controls grouping for uninitialized declarators, overriding per-kind options.
|
|
4174
|
+
*/
|
|
4175
|
+
uninitialized?: OneVarMode;
|
|
4176
|
+
/**
|
|
4177
|
+
* Controls grouping for `using` declarations.
|
|
4178
|
+
*/
|
|
4179
|
+
using?: OneVarMode;
|
|
4180
|
+
/**
|
|
4181
|
+
* Controls grouping for `var` declarations.
|
|
4182
|
+
*/
|
|
4183
|
+
var?: OneVarMode;
|
|
4184
|
+
}
|
|
4121
4185
|
interface NoAsyncEndpointHandlersConfig {
|
|
4122
4186
|
/**
|
|
4123
4187
|
* An array of names that are allowed to be async.
|
|
@@ -5114,6 +5178,9 @@ interface BanTsCommentConfig {
|
|
|
5114
5178
|
*/
|
|
5115
5179
|
"ts-nocheck"?: DirectiveConfigSchema;
|
|
5116
5180
|
}
|
|
5181
|
+
interface DescriptionFormatConfig {
|
|
5182
|
+
descriptionFormat?: string;
|
|
5183
|
+
}
|
|
5117
5184
|
interface ConsistentReturnConfig {
|
|
5118
5185
|
/**
|
|
5119
5186
|
* Treat explicit `return undefined` as equivalent to an unspecified return.
|