oxlint 1.80.0 → 1.82.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 +106 -44
- package/dist/bindings.js +28 -30
- package/dist/index.d.ts +84 -40
- package/dist/lint.js +16 -30
- package/dist/plugins-dev.d.ts +128 -31
- package/dist/plugins-dev.js +3 -2
- package/dist/rolldown-runtime.js +21 -0
- package/package.json +21 -21
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//#region src-js/package/config.generated.d.ts
|
|
8
8
|
type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
|
|
9
|
-
type GlobalValue =
|
|
9
|
+
type GlobalValue = "readonly" | "writable" | "off";
|
|
10
10
|
type ExternalPluginEntry = string | {
|
|
11
11
|
/**
|
|
12
12
|
* Custom name/alias for the plugin.
|
|
@@ -75,7 +75,7 @@ type Mode = "prefer-top-level" | "prefer-inline" | "prefer-top-level-if-only-typ
|
|
|
75
75
|
*/
|
|
76
76
|
type ExtensionRule = "always" | "never" | "ignorePackages";
|
|
77
77
|
type ImportExtensionsObject = ImportExtensionsConfig | {
|
|
78
|
-
[k: string]: ExtensionRule;
|
|
78
|
+
[k: string]: ExtensionRule | undefined;
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
81
|
* Action to take for path group overrides.
|
|
@@ -276,7 +276,7 @@ type ChecksVoidReturn = boolean | ChecksVoidReturnOptions;
|
|
|
276
276
|
* - A string - ban with custom message
|
|
277
277
|
* - An object with `message` and optional `fixWith` and `suggest`
|
|
278
278
|
*/
|
|
279
|
-
type BanConfigValue =
|
|
279
|
+
type BanConfigValue = True | string | {
|
|
280
280
|
/**
|
|
281
281
|
* Replacement type for automatic fixing. Applied directly with `--fix`.
|
|
282
282
|
*/
|
|
@@ -289,7 +289,7 @@ type BanConfigValue = (True | string | {
|
|
|
289
289
|
* Suggested replacement types for manual review. Shown as editor suggestions.
|
|
290
290
|
*/
|
|
291
291
|
suggest?: string[];
|
|
292
|
-
}
|
|
292
|
+
};
|
|
293
293
|
type True = true;
|
|
294
294
|
/**
|
|
295
295
|
* Represents the different ways `allowConstantLoopConditions` can be specified in JSON.
|
|
@@ -315,7 +315,7 @@ type TypesOption = "always" | "never" | "prefer-import";
|
|
|
315
315
|
type BomOptionType = "always" | "never";
|
|
316
316
|
type NonZero = "greater-than" | "not-equal";
|
|
317
317
|
type ExplicitTimerDelayMode = "always" | "never";
|
|
318
|
-
type ModuleStylesOverride =
|
|
318
|
+
type ModuleStylesOverride = false | {
|
|
319
319
|
/**
|
|
320
320
|
* Whether default imports or whole-module `require()` assignments are allowed for this module.
|
|
321
321
|
*
|
|
@@ -352,7 +352,7 @@ type ModuleStylesOverride = (false | {
|
|
|
352
352
|
* ```
|
|
353
353
|
*/
|
|
354
354
|
unassigned?: boolean;
|
|
355
|
-
}
|
|
355
|
+
};
|
|
356
356
|
type NoInstanceofBuiltinsStrategy = "strict" | "loose";
|
|
357
357
|
type PreferTernaryOption = "always" | "only-single-line";
|
|
358
358
|
type RelativeUrlStyleConfig = "never" | "always";
|
|
@@ -368,14 +368,14 @@ type CaseType2 = "camelCase" | "snake_case";
|
|
|
368
368
|
type AllowYoda = "never" | "always";
|
|
369
369
|
type OxlintOverrides = OxlintOverride[];
|
|
370
370
|
type JestVersionSchema = number | string;
|
|
371
|
-
type TagNamePreference =
|
|
371
|
+
type TagNamePreference = string | {
|
|
372
372
|
message: string;
|
|
373
373
|
replacement: string;
|
|
374
374
|
[k: string]: unknown | undefined;
|
|
375
375
|
} | {
|
|
376
376
|
message: string;
|
|
377
377
|
[k: string]: unknown | undefined;
|
|
378
|
-
} | boolean
|
|
378
|
+
} | boolean;
|
|
379
379
|
type OneOrManyFor_String = string | string[];
|
|
380
380
|
type CustomComponent = string | {
|
|
381
381
|
attribute: string;
|
|
@@ -1140,7 +1140,7 @@ interface DummyRuleMap {
|
|
|
1140
1140
|
"no-undefined"?: RuleNoConfig;
|
|
1141
1141
|
"no-underscore-dangle"?: RuleNoConfig | [AllowWarnDeny, NoUnderscoreDangleConfig];
|
|
1142
1142
|
"no-unexpected-multiline"?: RuleNoConfig;
|
|
1143
|
-
"no-unmodified-loop-condition"?: RuleNoConfig;
|
|
1143
|
+
"no-unmodified-loop-condition"?: RuleNoConfig | [AllowWarnDeny, NoUnmodifiedLoopCondition];
|
|
1144
1144
|
"no-unneeded-ternary"?: RuleNoConfig | [AllowWarnDeny, NoUnneededTernary];
|
|
1145
1145
|
"no-unreachable"?: RuleNoConfig;
|
|
1146
1146
|
"no-unreachable-loop"?: RuleNoConfig | [AllowWarnDeny, NoUnreachableLoopConfig];
|
|
@@ -1706,7 +1706,7 @@ interface DummyRuleMap {
|
|
|
1706
1706
|
"vue/valid-define-props"?: RuleNoConfig;
|
|
1707
1707
|
"vue/valid-next-tick"?: RuleNoConfig;
|
|
1708
1708
|
yoda?: RuleNoConfig | [AllowWarnDeny, AllowYoda] | [AllowWarnDeny, AllowYoda, YodaOptions];
|
|
1709
|
-
[k: string]: DummyRule | undefined;
|
|
1709
|
+
[k: string]: DummyRule | RuleNoConfig | [AllowWarnDeny, AccessorPairsConfig] | [AllowWarnDeny, ArrayCallbackReturn] | [AllowWarnDeny, Mode2] | [AllowWarnDeny, Mode2, ArrowBodyStyleConfig] | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, OptionsJsonEnum] | [AllowWarnDeny, ClassMethodsUseThisConfig] | [AllowWarnDeny, ComplexityConfigEnum] | [AllowWarnDeny, CurlyType] | [AllowWarnDeny, CurlyType, CurlyConsistent] | [AllowWarnDeny, DefaultCaseConfig] | [AllowWarnDeny, CompareType] | [AllowWarnDeny, CompareType, EqeqeqOptions] | [AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingMode, FuncNameMatchingConfig] | [AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingConfig] | [AllowWarnDeny, FuncNamesConfigType] | [AllowWarnDeny, FuncNamesConfigType, FuncNamesGeneratorsConfig] | [AllowWarnDeny, Style] | [AllowWarnDeny, Style, FuncStyleConfig] | [AllowWarnDeny, GetterReturn] | [AllowWarnDeny, PairOrder] | [AllowWarnDeny, PairOrder, GroupedAccessorPairsConfig] | [AllowWarnDeny, ...string[]] | [AllowWarnDeny, IdLengthConfig] | [AllowWarnDeny, string] | [AllowWarnDeny, string, IdMatchOptions] | [AllowWarnDeny, Mode] | [AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ExtensionRule, ImportExtensionsObject] | [AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ImportExtensionsObject] | [AllowWarnDeny, AbsoluteFirst] | [AllowWarnDeny, MaxDependenciesConfigJson] | [AllowWarnDeny, Namespace] | [AllowWarnDeny, NewlineAfterImport] | [AllowWarnDeny, NoAbsolutePath] | [AllowWarnDeny, NoAnonymousDefaultExport] | [AllowWarnDeny, NoCommonjs] | [AllowWarnDeny, NoCycle] | [AllowWarnDeny, NoDuplicates] | [AllowWarnDeny, NoDynamicRequire] | [AllowWarnDeny, NoNamespaceConfig] | [AllowWarnDeny, NoNodejsModulesConfig] | [AllowWarnDeny, NoUnassignedImportConfig] | [AllowWarnDeny, PreferDefaultExport] | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, InitDeclarationsConfig] | [AllowWarnDeny, ConsistentTestItConfig] | [AllowWarnDeny, ExpectExpectConfig] | [AllowWarnDeny, MaxExpectsConfig] | [AllowWarnDeny, MaxNestedDescribeConfig] | [AllowWarnDeny, NoDeprecatedFunctionsConfig] | [AllowWarnDeny, NoHooksConfig] | [AllowWarnDeny, NoLargeSnapshotsConfig] | [AllowWarnDeny, NoRestrictedTestMethodsConfig] | [AllowWarnDeny, NoRestrictedMatchersConfig] | [AllowWarnDeny, NoStandaloneExpectConfig] | [AllowWarnDeny, PreferEndingWithAnExpectConfig] | [AllowWarnDeny, PreferExpectAssertionsConfig] | [AllowWarnDeny, PreferImportingJestGlobalsConfig] | [AllowWarnDeny, PreferLowercaseTitleConfig] | [AllowWarnDeny, SnapshotHintMode] | [AllowWarnDeny, RequireHookConfig] | [AllowWarnDeny, RequireTopLevelDescribeConfig] | [AllowWarnDeny, ValidExpectConfig] | [AllowWarnDeny, CheckTagNamesConfig] | [AllowWarnDeny, EmptyTagsConfig] | [AllowWarnDeny, NoBlankBlocks] | [AllowWarnDeny, NoDefaultsConfig] | [AllowWarnDeny, RequireParamConfig] | [AllowWarnDeny, RequireParamDescriptionConfig] | [AllowWarnDeny, RequireParamTypeConfig] | [AllowWarnDeny, RequireReturnsConfig] | [AllowWarnDeny, RequireYieldsConfig] | [AllowWarnDeny, AltTextConfigSchema] | [AllowWarnDeny, AnchorAmbiguousTextConfig] | [AllowWarnDeny, AnchorHasContentConfig] | [AllowWarnDeny, AnchorIsValidConfig] | [AllowWarnDeny, AriaRoleConfig] | [AllowWarnDeny, AutocompleteValidConfig] | [AllowWarnDeny, ControlHasAssociatedLabelConfig] | [AllowWarnDeny, HeadingHasContentConfig] | [AllowWarnDeny, ImgRedundantAltConfig] | [AllowWarnDeny, InteractiveSupportsFocusConfig] | [AllowWarnDeny, LabelHasAssociatedControlConfig] | [AllowWarnDeny, MediaHasCaptionConfig] | [AllowWarnDeny, MouseEventsHaveKeyEventsConfig] | [AllowWarnDeny, NoAutofocus] | [AllowWarnDeny, NoDistractingElementsConfig] | [AllowWarnDeny, NoInteractiveElementToNoninteractiveRoleConfig] | [AllowWarnDeny, NoNoninteractiveElementInteractionsConfig] | [AllowWarnDeny, NoNoninteractiveElementToInteractiveRoleConfig] | [AllowWarnDeny, NoNoninteractiveTabindexConfig] | [AllowWarnDeny, NoRedundantRolesConfig] | [AllowWarnDeny, NoStaticElementInteractionsConfig] | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, LogicalAssignmentOperatorsConfig] | [AllowWarnDeny, MaxClassesPerFileConfigEnum] | [AllowWarnDeny, MaxDepthConfigEnum] | [AllowWarnDeny, MaxLinesConfigEnum] | [AllowWarnDeny, MaxLinesPerFunctionConfigEnum] | [AllowWarnDeny, MaxNestedCallbacksConfigEnum] | [AllowWarnDeny, MaxParamsConfigEnum] | [AllowWarnDeny, MaxStatementsConfigEnum] | [AllowWarnDeny, NewCapConfig] | [AllowWarnDeny, NoBitwiseConfig] | [AllowWarnDeny, NoCondAssignConfig] | [AllowWarnDeny, NoConsoleConfig] | [AllowWarnDeny, NoConstantBinaryExpressionConfig] | [AllowWarnDeny, NoConstantCondition] | [AllowWarnDeny, NoDuplicateImports] | [AllowWarnDeny, NoElseReturn] | [AllowWarnDeny, NoEmpty] | [AllowWarnDeny, NoEmptyFunctionConfig] | [AllowWarnDeny, NoEmptyPattern] | [AllowWarnDeny, NoEval] | [AllowWarnDeny, NoExtendNativeConfig] | [AllowWarnDeny, NoExtraBooleanCast] | [AllowWarnDeny, NoFallthroughConfig] | [AllowWarnDeny, NoGlobalAssignConfig] | [AllowWarnDeny, NoImplicitCoercionConfig] | [AllowWarnDeny, NoImplicitGlobalsConfig] | [AllowWarnDeny, NoInlineCommentsConfig] | [AllowWarnDeny, NoInnerDeclarationsConfig] | [AllowWarnDeny, NoInnerDeclarationsConfig, NoInnerDeclarationsOptions] | [AllowWarnDeny, NoInvalidRegexpConfig] | [AllowWarnDeny, NoIrregularWhitespaceConfig] | [AllowWarnDeny, NoLabels] | [AllowWarnDeny, NoMagicNumbersConfig] | [AllowWarnDeny, NoMisleadingCharacterClass] | [AllowWarnDeny, NoMultiAssign] | [AllowWarnDeny, NoParamReassignConfig] | [AllowWarnDeny, NoPlusplus] | [AllowWarnDeny, NoPromiseExecutorReturnConfig] | [AllowWarnDeny, NoRedeclare] | [AllowWarnDeny, NoRestrictedExportsConfig] | [AllowWarnDeny, ...NoRestrictedGlobalsConfigEnum[]] | [AllowWarnDeny, ...NoRestrictedImportsConfigEnum[]] | [AllowWarnDeny, ...PropertyDetails[]] | [AllowWarnDeny, NoReturnAssignMode] | [AllowWarnDeny, NoSelfAssign] | [AllowWarnDeny, NoSequences] | [AllowWarnDeny, NoShadowConfig] | [AllowWarnDeny, NoShadowRestrictedNamesConfig] | [AllowWarnDeny, NoUndef] | [AllowWarnDeny, NoUnderscoreDangleConfig] | [AllowWarnDeny, NoUnmodifiedLoopCondition] | [AllowWarnDeny, NoUnneededTernary] | [AllowWarnDeny, NoUnreachableLoopConfig] | [AllowWarnDeny, NoUnsafeNegation] | [AllowWarnDeny, NoUnsafeOptionalChaining] | [AllowWarnDeny, NoUnusedExpressionsConfig] | [AllowWarnDeny, NoUnusedVarsConfig] | [AllowWarnDeny, NoUseBeforeDefineConfigJson] | [AllowWarnDeny, NoUselessComputedKey] | [AllowWarnDeny, NoUselessEscapeConfig] | [AllowWarnDeny, NoUselessRenameConfig] | [AllowWarnDeny, NoVoid] | [AllowWarnDeny, NoWarningCommentsConfig] | [AllowWarnDeny, CallbackReturn] | [AllowWarnDeny, ExportsStyleMode] | [AllowWarnDeny, ExportsStyleMode, ExportsStyleOptions] | [AllowWarnDeny, HandleCallbackErrConfig] | [AllowWarnDeny, NoMixedRequiresConfig] | [AllowWarnDeny, NoProcessEnvConfig] | [AllowWarnDeny, NoSyncConfig] | [AllowWarnDeny, NoTopLevelAwaitConfig] | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions] | [AllowWarnDeny, OneVar] | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, NoAsyncEndpointHandlersConfig] | [AllowWarnDeny, NoBarrelFile] | [AllowWarnDeny, NoMapSpreadConfig] | [AllowWarnDeny, NoOptionalChainingConfig] | [AllowWarnDeny, NoRestSpreadPropertiesOptions] | [AllowWarnDeny, PreferArrowCallbackConfig] | [AllowWarnDeny, PreferConstConfig] | [AllowWarnDeny, PreferDestructuringOption] | [AllowWarnDeny, PreferDestructuringOption, PreferDestructuringEnforcementConfig] | [AllowWarnDeny, PreferPromiseRejectErrors] | [AllowWarnDeny, PreferRegexLiteralsConfig] | [AllowWarnDeny, PreserveCaughtErrorOptions] | [AllowWarnDeny, AlwaysReturnConfig] | [AllowWarnDeny, CatchOrReturnConfig] | [AllowWarnDeny, NoCallbackInPromiseConfig] | [AllowWarnDeny, NoPromiseInCallbackConfig] | [AllowWarnDeny, NoReturnWrap] | [AllowWarnDeny, ParamNamesConfig] | [AllowWarnDeny, PreferAwaitToThenConfig] | [AllowWarnDeny, SpecOnlyConfig] | [AllowWarnDeny, RadixType] | [AllowWarnDeny, ReactPerfConfig] | [AllowWarnDeny, ButtonHasType] | [AllowWarnDeny, CheckedRequiresOnchangeOrReadonly] | [AllowWarnDeny, DisplayNameConfig] | [AllowWarnDeny, ExhaustiveDepsConfig] | [AllowWarnDeny, ForbidComponentPropsConfig] | [AllowWarnDeny, ForbidDomPropsConfig] | [AllowWarnDeny, ForbidElementsConfig] | [AllowWarnDeny, FunctionComponentDefinitionConfig] | [AllowWarnDeny, HookUseStateConfig] | [AllowWarnDeny, EnforceBooleanAttribute] | [AllowWarnDeny, EnforceBooleanAttribute, JsxBooleanValueOptions] | [AllowWarnDeny, JsxCurlyBracePresenceConfig] | [AllowWarnDeny, JsxFilenameExtensionConfig] | [AllowWarnDeny, FragmentMode] | [AllowWarnDeny, JsxHandlerNamesConfig] | [AllowWarnDeny, JsxKeyConfig] | [AllowWarnDeny, JsxMaxDepthConfig] | [AllowWarnDeny, JsxNoLiteralsConfig] | [AllowWarnDeny, JsxNoScriptUrlComponent[]] | [AllowWarnDeny, JsxNoScriptUrlComponent[], JsxNoScriptUrlOptions] | [AllowWarnDeny, JsxNoScriptUrlOptions] | [AllowWarnDeny, JsxNoTargetBlank] | [AllowWarnDeny, JsxNoUselessFragment] | [AllowWarnDeny, JsxPascalCaseConfig] | [AllowWarnDeny, JsxPropsNoSpreadingConfig] | [AllowWarnDeny, AllowedOrDisallowInFunc] | [AllowWarnDeny, NoMultiCompConfig] | [AllowWarnDeny, NoStringRefs] | [AllowWarnDeny, NoUnknownPropertyConfig] | [AllowWarnDeny, NoUnsafeConfig] | [AllowWarnDeny, NoUnstableNestedComponentsConfig] | [AllowWarnDeny, OnlyExportComponentsConfig] | [AllowWarnDeny, PreferFunctionComponent] | [AllowWarnDeny, SelfClosingComp] | [AllowWarnDeny, StylePropObjectConfig] | [AllowWarnDeny, RequireUnicodeRegexpConfig] | [AllowWarnDeny, SortImportsOptions] | [AllowWarnDeny, SortOrder] | [AllowWarnDeny, SortOrder, SortKeysOptions] | [AllowWarnDeny, SortVars] | [AllowWarnDeny, ArrayTypeConfig] | [AllowWarnDeny, BanTsCommentConfig] | [AllowWarnDeny, ClassLiteralPropertyStyleOption] | [AllowWarnDeny, PreferGenericType] | [AllowWarnDeny, ConsistentIndexedObjectStyleConfig] | [AllowWarnDeny, ConsistentReturnConfig] | [AllowWarnDeny, ConsistentTypeAssertionsConfig] | [AllowWarnDeny, ConsistentTypeDefinitionsConfig] | [AllowWarnDeny, ConsistentTypeExportsConfig] | [AllowWarnDeny, ConsistentTypeImportsConfig] | [AllowWarnDeny, DotNotationConfig] | [AllowWarnDeny, ExplicitFunctionReturnTypeConfig] | [AllowWarnDeny, ExplicitMemberAccessibilityConfig] | [AllowWarnDeny, ExplicitModuleBoundaryTypesConfig] | [AllowWarnDeny, MethodSignatureStyleConfig] | [AllowWarnDeny, NoBaseToStringConfig] | [AllowWarnDeny, NoConfusingVoidExpressionConfig] | [AllowWarnDeny, NoDeprecatedConfig] | [AllowWarnDeny, NoDuplicateTypeConstituentsConfig] | [AllowWarnDeny, NoEmptyInterface] | [AllowWarnDeny, NoEmptyObjectTypeConfig] | [AllowWarnDeny, NoExplicitAny] | [AllowWarnDeny, NoExtraneousClass] | [AllowWarnDeny, NoFloatingPromisesConfig] | [AllowWarnDeny, NoInferrableTypes] | [AllowWarnDeny, NoInvalidVoidTypeConfig] | [AllowWarnDeny, NoMeaninglessVoidOperatorConfig] | [AllowWarnDeny, NoMisusedPromisesConfig] | [AllowWarnDeny, NoMisusedSpreadConfig] | [AllowWarnDeny, NoNamespace] | [AllowWarnDeny, NoRequireImportsConfig] | [AllowWarnDeny, NoRestrictedTypesConfig] | [AllowWarnDeny, NoThisAliasConfig] | [AllowWarnDeny, NoUnnecessaryBooleanLiteralCompareConfig] | [AllowWarnDeny, NoUnnecessaryConditionConfig] | [AllowWarnDeny, NoUnnecessaryTypeAssertionConfig] | [AllowWarnDeny, NoUnsafeMemberAccessConfig] | [AllowWarnDeny, OnlyThrowErrorConfig] | [AllowWarnDeny, ParameterPropertiesConfig] | [AllowWarnDeny, PreferLiteralEnumMember] | [AllowWarnDeny, PreferNullishCoalescingConfig] | [AllowWarnDeny, PreferOptionalChainConfig] | [AllowWarnDeny, PreferPromiseRejectErrorsConfig] | [AllowWarnDeny, PreferReadonlyConfig] | [AllowWarnDeny, PreferReadonlyParameterTypesConfig] | [AllowWarnDeny, PreferStringStartsEndsWithConfig] | [AllowWarnDeny, PromiseFunctionAsyncConfig] | [AllowWarnDeny, RequireArraySortCompareConfig] | [AllowWarnDeny, RestrictPlusOperandsConfig] | [AllowWarnDeny, RestrictTemplateExpressionsConfig] | [AllowWarnDeny, ReturnAwaitOption] | [AllowWarnDeny, StrictBooleanExpressionsConfig] | [AllowWarnDeny, StrictVoidReturnConfig] | [AllowWarnDeny, SwitchExhaustivenessCheckConfig] | [AllowWarnDeny, TripleSlashReferenceConfig] | [AllowWarnDeny, UnboundMethodConfig] | [AllowWarnDeny, UnifiedSignaturesOptions] | [AllowWarnDeny, BomOptionType] | [AllowWarnDeny, CatchErrorNameConfig] | [AllowWarnDeny, ConsistentFunctionScoping] | [AllowWarnDeny, ExplicitLengthCheck] | [AllowWarnDeny, ExplicitTimerDelayMode] | [AllowWarnDeny, ImportStyleConfig] | [AllowWarnDeny, MaxNestedCalls] | [AllowWarnDeny, NoArrayReduce] | [AllowWarnDeny, NoArrayReverse] | [AllowWarnDeny, NoArraySort] | [AllowWarnDeny, NoInstanceofBuiltinsConfig] | [AllowWarnDeny, NoNull] | [AllowWarnDeny, NoTypeofUndefined] | [AllowWarnDeny, NoUselessPromiseResolveRejectOptions] | [AllowWarnDeny, NoUselessUndefined] | [AllowWarnDeny, NumericSeparatorsStyleConfig] | [AllowWarnDeny, PreferAtConfig] | [AllowWarnDeny, PreferExportFrom] | [AllowWarnDeny, PreferNumberPropertiesConfig] | [AllowWarnDeny, PreferObjectFromEntriesConfig] | [AllowWarnDeny, PreferSingleCallConfig] | [AllowWarnDeny, PreferStructuredCloneConfig] | [AllowWarnDeny, PreferTernaryOption] | [AllowWarnDeny, RelativeUrlStyleConfig] | [AllowWarnDeny, SwitchCaseBracesConfig] | [AllowWarnDeny, TextEncodingIdentifierCase] | [AllowWarnDeny, UseIsnan] | [AllowWarnDeny, ValidTypeof] | [AllowWarnDeny, ConsistentEachForJson] | [AllowWarnDeny, ConsistentTestFilenameConfig] | [AllowWarnDeny, ConsistentVitestConfig] | [AllowWarnDeny, PreferImportInMockConfig] | [AllowWarnDeny, RequireMockTypeParametersConfig] | [AllowWarnDeny, CaseType] | [AllowWarnDeny, DeclarationStyle] | [AllowWarnDeny, DeclarationStyle2] | [AllowWarnDeny, DefinePropsDestructuring] | [AllowWarnDeny, MaxProps] | [AllowWarnDeny, NextTickOption] | [AllowWarnDeny, NoAsyncInComputedPropertiesConfig] | [AllowWarnDeny, NoDeprecatedModelDefinitionConfig] | [AllowWarnDeny, NoDupeKeysConfig] | [AllowWarnDeny, NoReservedComponentNames] | [AllowWarnDeny, NoReservedKeysConfig] | [AllowWarnDeny, NoReservedPropsConfig] | [AllowWarnDeny, CaseType2] | [AllowWarnDeny, CaseType2, Options] | [AllowWarnDeny, RequireDirectExport] | [AllowWarnDeny, ReturnInComputedPropertyConfig] | [AllowWarnDeny, AllowYoda] | [AllowWarnDeny, AllowYoda, YodaOptions] | undefined;
|
|
1710
1710
|
}
|
|
1711
1711
|
interface AccessorPairsConfig {
|
|
1712
1712
|
/**
|
|
@@ -1985,7 +1985,7 @@ interface ImportExtensionsConfig {
|
|
|
1985
1985
|
* Per-extension rules.
|
|
1986
1986
|
*/
|
|
1987
1987
|
pattern?: {
|
|
1988
|
-
[k: string]: ExtensionRule;
|
|
1988
|
+
[k: string]: ExtensionRule | undefined;
|
|
1989
1989
|
};
|
|
1990
1990
|
}
|
|
1991
1991
|
interface PathGroupOverrideConfig {
|
|
@@ -2320,10 +2320,10 @@ interface NoLargeSnapshotsConfig {
|
|
|
2320
2320
|
maxSize?: number;
|
|
2321
2321
|
}
|
|
2322
2322
|
interface NoRestrictedTestMethodsConfig {
|
|
2323
|
-
[k: string]:
|
|
2323
|
+
[k: string]: string | null | undefined;
|
|
2324
2324
|
}
|
|
2325
2325
|
interface NoRestrictedMatchersConfig {
|
|
2326
|
-
[k: string]:
|
|
2326
|
+
[k: string]: string | null | undefined;
|
|
2327
2327
|
}
|
|
2328
2328
|
interface NoStandaloneExpectConfig {
|
|
2329
2329
|
/**
|
|
@@ -3720,6 +3720,13 @@ interface NoUnderscoreDangleConfig {
|
|
|
3720
3720
|
*/
|
|
3721
3721
|
enforceInMethodNames?: boolean;
|
|
3722
3722
|
}
|
|
3723
|
+
interface NoUnmodifiedLoopCondition {
|
|
3724
|
+
/**
|
|
3725
|
+
* Whether references in each branch of a conditional expression should be checked
|
|
3726
|
+
* independently instead of checking the result of the entire expression.
|
|
3727
|
+
*/
|
|
3728
|
+
checkConditionalExpressions?: boolean;
|
|
3729
|
+
}
|
|
3723
3730
|
interface NoUnneededTernary {
|
|
3724
3731
|
/**
|
|
3725
3732
|
* Whether to allow the default assignment pattern `x ? x : y`.
|
|
@@ -6113,9 +6120,11 @@ interface SwitchExhaustivenessCheckConfig {
|
|
|
6113
6120
|
*/
|
|
6114
6121
|
considerDefaultExhaustiveForUnions?: boolean;
|
|
6115
6122
|
/**
|
|
6116
|
-
* Regular expression pattern that
|
|
6117
|
-
*
|
|
6118
|
-
*
|
|
6123
|
+
* Regular expression pattern for a comment that acts as an omitted `default` case.
|
|
6124
|
+
* The comment must appear after the final case and the switch must not have a `default` case.
|
|
6125
|
+
* For union types, it suppresses the exhaustiveness check only when
|
|
6126
|
+
* `considerDefaultExhaustiveForUnions` is enabled.
|
|
6127
|
+
* Example: `"^skip default$"` to allow a switch ending in `// skip default`.
|
|
6119
6128
|
*/
|
|
6120
6129
|
defaultCaseCommentPattern?: string;
|
|
6121
6130
|
/**
|
|
@@ -6399,12 +6408,48 @@ interface NumericSeparatorsStyleConfig {
|
|
|
6399
6408
|
* Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).
|
|
6400
6409
|
* Controls how digits are grouped and when separators are applied.
|
|
6401
6410
|
*/
|
|
6402
|
-
binary?:
|
|
6411
|
+
binary?: {
|
|
6412
|
+
/**
|
|
6413
|
+
* The number of digits per group when inserting numeric separators.
|
|
6414
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6415
|
+
*/
|
|
6416
|
+
groupLength?: number;
|
|
6417
|
+
/**
|
|
6418
|
+
* The minimum number of digits required before grouping is applied.
|
|
6419
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6420
|
+
*/
|
|
6421
|
+
minimumDigits?: number;
|
|
6422
|
+
/**
|
|
6423
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6424
|
+
*
|
|
6425
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6426
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6427
|
+
*/
|
|
6428
|
+
onlyIfContainsSeparator?: boolean;
|
|
6429
|
+
};
|
|
6403
6430
|
/**
|
|
6404
6431
|
* Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).
|
|
6405
6432
|
* Controls how digits are grouped and when separators are applied.
|
|
6406
6433
|
*/
|
|
6407
|
-
hexadecimal?:
|
|
6434
|
+
hexadecimal?: {
|
|
6435
|
+
/**
|
|
6436
|
+
* The number of digits per group when inserting numeric separators.
|
|
6437
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6438
|
+
*/
|
|
6439
|
+
groupLength?: number;
|
|
6440
|
+
/**
|
|
6441
|
+
* The minimum number of digits required before grouping is applied.
|
|
6442
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6443
|
+
*/
|
|
6444
|
+
minimumDigits?: number;
|
|
6445
|
+
/**
|
|
6446
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6447
|
+
*
|
|
6448
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6449
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6450
|
+
*/
|
|
6451
|
+
onlyIfContainsSeparator?: boolean;
|
|
6452
|
+
};
|
|
6408
6453
|
/**
|
|
6409
6454
|
* Configuration for decimal numbers (integers, fraction parts, and exponents).
|
|
6410
6455
|
* Controls how digits are grouped and when separators are applied.
|
|
@@ -6414,26 +6459,25 @@ interface NumericSeparatorsStyleConfig {
|
|
|
6414
6459
|
* Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).
|
|
6415
6460
|
* Controls how digits are grouped and when separators are applied.
|
|
6416
6461
|
*/
|
|
6417
|
-
octal?:
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
minimumDigits?: number;
|
|
6462
|
+
octal?: {
|
|
6463
|
+
/**
|
|
6464
|
+
* The number of digits per group when inserting numeric separators.
|
|
6465
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6466
|
+
*/
|
|
6467
|
+
groupLength?: number;
|
|
6468
|
+
/**
|
|
6469
|
+
* The minimum number of digits required before grouping is applied.
|
|
6470
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6471
|
+
*/
|
|
6472
|
+
minimumDigits?: number;
|
|
6473
|
+
/**
|
|
6474
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6475
|
+
*
|
|
6476
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6477
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6478
|
+
*/
|
|
6479
|
+
onlyIfContainsSeparator?: boolean;
|
|
6480
|
+
};
|
|
6437
6481
|
/**
|
|
6438
6482
|
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6439
6483
|
*
|
|
@@ -7011,6 +7055,6 @@ interface OxlintConfig extends Oxlintrc {
|
|
|
7011
7055
|
* @param config - Oxlint configuration
|
|
7012
7056
|
* @returns Config unchanged
|
|
7013
7057
|
*/
|
|
7014
|
-
declare function defineConfig<T extends OxlintConfig>(config: T & OxlintConfig): T;
|
|
7058
|
+
export declare function defineConfig<T extends OxlintConfig>(config: T & OxlintConfig): T;
|
|
7015
7059
|
//#endregion
|
|
7016
|
-
export {
|
|
7060
|
+
export type { AllowWarnDeny, DummyRule, DummyRuleMap, ExternalPluginEntry, ExternalPluginsConfig, OxlintConfig, OxlintEnv, OxlintGlobals, OxlintOverride, RuleCategories };
|
package/dist/lint.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime.js";
|
|
1
2
|
import { a as setCurrentWorkspace, n as currentWorkspace, o as workspaces, r as currentWorkspaceUri } from "./workspace2.js";
|
|
2
3
|
import { t as getErrorMessage } from "./utils.js";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
4
|
import "node:assert";
|
|
5
|
-
//#region \0rolldown/runtime.js
|
|
6
|
-
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports), __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) key = keys[i], !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
8
|
-
get: ((k) => from[k]).bind(null, key),
|
|
9
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
-
});
|
|
11
|
-
return to;
|
|
12
|
-
}, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
13
|
-
value: mod,
|
|
14
|
-
enumerable: !0
|
|
15
|
-
}) : target, mod)), __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
16
|
-
//#endregion
|
|
17
5
|
//#region src-js/generated/constants.ts
|
|
18
6
|
/**
|
|
19
7
|
* Total size of the allocator block (including metadata and allocator `ChunkFooter`).
|
|
@@ -14202,7 +14190,7 @@ const ArrayIsArray$4 = Array.isArray, ObjectFreeze$2 = Object.freeze;
|
|
|
14202
14190
|
* @param value - The value to deep freeze
|
|
14203
14191
|
*/
|
|
14204
14192
|
function deepFreezeJsonValue(value) {
|
|
14205
|
-
typeof value
|
|
14193
|
+
typeof value == "object" && value && (ArrayIsArray$4(value) ? deepFreezeJsonArray(value) : deepFreezeJsonObject(value));
|
|
14206
14194
|
}
|
|
14207
14195
|
/**
|
|
14208
14196
|
* Deep freeze a JSON object, recursively freezing all nested objects and arrays.
|
|
@@ -14243,7 +14231,7 @@ function deepCloneJsonObject(obj) {
|
|
|
14243
14231
|
let cloned = { ...obj };
|
|
14244
14232
|
for (let key in cloned) {
|
|
14245
14233
|
let value = cloned[key];
|
|
14246
|
-
typeof value
|
|
14234
|
+
typeof value == "object" && value && (cloned[key] = ArrayIsArray$4(value) ? deepCloneJsonArray(value) : deepCloneJsonObject(value));
|
|
14247
14235
|
}
|
|
14248
14236
|
return cloned;
|
|
14249
14237
|
}
|
|
@@ -14286,7 +14274,7 @@ function resetSettings() {
|
|
|
14286
14274
|
}
|
|
14287
14275
|
//#endregion
|
|
14288
14276
|
//#region package.json
|
|
14289
|
-
var version = "1.
|
|
14277
|
+
var version = "1.82.0";
|
|
14290
14278
|
//#endregion
|
|
14291
14279
|
//#region src-js/plugins/context.ts
|
|
14292
14280
|
const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
|
|
@@ -16822,8 +16810,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16822
16810
|
module.exports = function(metaSchema, keywordsJsonPointers) {
|
|
16823
16811
|
for (var i = 0; i < keywordsJsonPointers.length; i++) {
|
|
16824
16812
|
metaSchema = JSON.parse(JSON.stringify(metaSchema));
|
|
16825
|
-
var segments = keywordsJsonPointers[i].split("/"), keywords = metaSchema, j;
|
|
16826
|
-
for (j = 1; j < segments.length; j++) keywords = keywords[segments[j]];
|
|
16813
|
+
for (var segments = keywordsJsonPointers[i].split("/"), keywords = metaSchema, j = 1; j < segments.length; j++) keywords = keywords[segments[j]];
|
|
16827
16814
|
for (j = 0; j < KEYWORDS.length; j++) {
|
|
16828
16815
|
var key = KEYWORDS[j], schema = keywords[key];
|
|
16829
16816
|
schema && (keywords[key] = { anyOf: [schema, { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }] });
|
|
@@ -17992,7 +17979,7 @@ function conformHookFn(hookFn, hookName) {
|
|
|
17992
17979
|
return hookFn;
|
|
17993
17980
|
}
|
|
17994
17981
|
//#endregion
|
|
17995
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
17982
|
+
//#region ../../node_modules/.pnpm/eslint@10.9.1/node_modules/eslint/lib/shared/assert.js
|
|
17996
17983
|
/**
|
|
17997
17984
|
* @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
|
|
17998
17985
|
* @author Josh Goldberg
|
|
@@ -19637,7 +19624,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
19637
19624
|
let forkContext = this.forkContext;
|
|
19638
19625
|
if (!forkContext.reachable) return;
|
|
19639
19626
|
let context = getThrowContext(this);
|
|
19640
|
-
context
|
|
19627
|
+
context !== this && context.thrownForkContext.empty && (context.position === "try" || context.position === "catch" && context.hasFinalizer) && (context.thrownForkContext.add(forkContext.head), forkContext.replaceHead(forkContext.makeNext(-1, -1)));
|
|
19641
19628
|
}
|
|
19642
19629
|
/**
|
|
19643
19630
|
* Creates a context object of a loop statement and stacks it.
|
|
@@ -22248,14 +22235,13 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22248
22235
|
return new f().traverse(e, t);
|
|
22249
22236
|
}
|
|
22250
22237
|
function m(e, t) {
|
|
22251
|
-
var r
|
|
22252
|
-
|
|
22253
|
-
var r, n, o, a;
|
|
22254
|
-
for (n = e.length, o = 0; n;) t(e[a = o + (r = n >>> 1)]) ? n = r : (o = a + 1, n -= r + 1);
|
|
22238
|
+
var r = function(e, t) {
|
|
22239
|
+
for (var r, n = e.length, o = 0, a; n;) t(e[a = o + (r = n >>> 1)]) ? n = r : (o = a + 1, n -= r + 1);
|
|
22255
22240
|
return o;
|
|
22256
22241
|
}(t, (function(t) {
|
|
22257
22242
|
return t.range[0] > e.range[0];
|
|
22258
|
-
}))
|
|
22243
|
+
}));
|
|
22244
|
+
return e.extendedRange = [e.range[0], e.range[1]], r !== t.length && (e.extendedRange[1] = t[r].range[0]), --r >= 0 && (e.extendedRange[0] = t[r].range[1]), e;
|
|
22259
22245
|
}
|
|
22260
22246
|
return r = {
|
|
22261
22247
|
AssignmentExpression: "AssignmentExpression",
|
|
@@ -22482,14 +22468,14 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22482
22468
|
}, f.prototype.type = function() {
|
|
22483
22469
|
return this.current().type || this.__current.wrap;
|
|
22484
22470
|
}, f.prototype.parents = function() {
|
|
22485
|
-
var e, t, r;
|
|
22486
|
-
for (
|
|
22471
|
+
var e, t, r = [];
|
|
22472
|
+
for (e = 1, t = this.__leavelist.length; e < t; ++e) r.push(this.__leavelist[e].node);
|
|
22487
22473
|
return r;
|
|
22488
22474
|
}, f.prototype.current = function() {
|
|
22489
22475
|
return this.__current.node;
|
|
22490
22476
|
}, f.prototype.__execute = function(e, t) {
|
|
22491
|
-
var r, n;
|
|
22492
|
-
return
|
|
22477
|
+
var r, n = void 0;
|
|
22478
|
+
return r = this.__current, this.__current = t, this.__state = null, e && (n = e.call(this, t.node, this.__leavelist[this.__leavelist.length - 1].node)), this.__current = r, n;
|
|
22493
22479
|
}, f.prototype.notify = function(e) {
|
|
22494
22480
|
this.__state = e;
|
|
22495
22481
|
}, f.prototype.skip = function() {
|
|
@@ -23960,4 +23946,4 @@ function resetStateAfterError() {
|
|
|
23960
23946
|
runAfterHooks(!1), finalizeCompiledVisitor(), resetCompiledVisitor(), diagnostics.length = 0, ancestors.length = 0, resetFile(), resetCfgWalk();
|
|
23961
23947
|
}
|
|
23962
23948
|
//#endregion
|
|
23963
|
-
export {
|
|
23949
|
+
export { BLOCK_ALIGN as _, loadPlugin as a, DATA_POINTER_POS_32 as b, registeredRules as c, PLACEHOLDER_REGEX as d, diagnostics as f, ACTIVE_SIZE as g, getNodeByRangeIndex as h, resetStateAfterError as i, allOptions as l, getLineColumnFromOffset as m, lintFile as n, registerPlugin as o, replacePlaceholders as p, lintFileImpl as r, registeredPluginNames as s, buffers as t, setOptions as u, BLOCK_SIZE as v, BUFFER_SIZE as y };
|