@oxlint/migrate 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/dist/bin/oxlint-migrate.mjs +1 -1
- package/dist/src/index.d.mts +83 -39
- package/package.json +5 -5
|
@@ -30,7 +30,7 @@ const loadESLintConfig = async (filePath) => {
|
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region package.json
|
|
33
|
-
var version = "1.
|
|
33
|
+
var version = "1.82.0";
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/walker/comments/replaceRuleDirectiveComment.ts
|
|
36
36
|
const allRulesSet = new Set(Object.values(rules_exports).flat());
|
package/dist/src/index.d.mts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* What to enforce for `/// <reference types="..." />` references.
|
|
12
12
|
*/
|
|
13
|
-
//#region node_modules/.pnpm/oxlint@1.
|
|
13
|
+
//#region node_modules/.pnpm/oxlint@1.82.0_oxlint-tsgolint@0.25.0/node_modules/oxlint/dist/index.d.ts
|
|
14
14
|
//#region src-js/package/config.generated.d.ts
|
|
15
15
|
type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
|
|
16
|
-
type GlobalValue =
|
|
16
|
+
type GlobalValue = "readonly" | "writable" | "off";
|
|
17
17
|
type ExternalPluginEntry = string | {
|
|
18
18
|
/**
|
|
19
19
|
* Custom name/alias for the plugin.
|
|
@@ -82,7 +82,7 @@ type Mode = "prefer-top-level" | "prefer-inline" | "prefer-top-level-if-only-typ
|
|
|
82
82
|
*/
|
|
83
83
|
type ExtensionRule = "always" | "never" | "ignorePackages";
|
|
84
84
|
type ImportExtensionsObject = ImportExtensionsConfig | {
|
|
85
|
-
[k: string]: ExtensionRule;
|
|
85
|
+
[k: string]: ExtensionRule | undefined;
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
* Action to take for path group overrides.
|
|
@@ -283,7 +283,7 @@ type ChecksVoidReturn = boolean | ChecksVoidReturnOptions;
|
|
|
283
283
|
* - A string - ban with custom message
|
|
284
284
|
* - An object with `message` and optional `fixWith` and `suggest`
|
|
285
285
|
*/
|
|
286
|
-
type BanConfigValue =
|
|
286
|
+
type BanConfigValue = True | string | {
|
|
287
287
|
/**
|
|
288
288
|
* Replacement type for automatic fixing. Applied directly with `--fix`.
|
|
289
289
|
*/
|
|
@@ -296,7 +296,7 @@ type BanConfigValue = (True | string | {
|
|
|
296
296
|
* Suggested replacement types for manual review. Shown as editor suggestions.
|
|
297
297
|
*/
|
|
298
298
|
suggest?: string[];
|
|
299
|
-
}
|
|
299
|
+
};
|
|
300
300
|
type True = true;
|
|
301
301
|
/**
|
|
302
302
|
* Represents the different ways `allowConstantLoopConditions` can be specified in JSON.
|
|
@@ -322,7 +322,7 @@ type TypesOption = "always" | "never" | "prefer-import";
|
|
|
322
322
|
type BomOptionType = "always" | "never";
|
|
323
323
|
type NonZero = "greater-than" | "not-equal";
|
|
324
324
|
type ExplicitTimerDelayMode = "always" | "never";
|
|
325
|
-
type ModuleStylesOverride =
|
|
325
|
+
type ModuleStylesOverride = false | {
|
|
326
326
|
/**
|
|
327
327
|
* Whether default imports or whole-module `require()` assignments are allowed for this module.
|
|
328
328
|
*
|
|
@@ -359,7 +359,7 @@ type ModuleStylesOverride = (false | {
|
|
|
359
359
|
* ```
|
|
360
360
|
*/
|
|
361
361
|
unassigned?: boolean;
|
|
362
|
-
}
|
|
362
|
+
};
|
|
363
363
|
type NoInstanceofBuiltinsStrategy = "strict" | "loose";
|
|
364
364
|
type PreferTernaryOption = "always" | "only-single-line";
|
|
365
365
|
type RelativeUrlStyleConfig = "never" | "always";
|
|
@@ -375,14 +375,14 @@ type CaseType2 = "camelCase" | "snake_case";
|
|
|
375
375
|
type AllowYoda = "never" | "always";
|
|
376
376
|
type OxlintOverrides = OxlintOverride[];
|
|
377
377
|
type JestVersionSchema = number | string;
|
|
378
|
-
type TagNamePreference =
|
|
378
|
+
type TagNamePreference = string | {
|
|
379
379
|
message: string;
|
|
380
380
|
replacement: string;
|
|
381
381
|
[k: string]: unknown | undefined;
|
|
382
382
|
} | {
|
|
383
383
|
message: string;
|
|
384
384
|
[k: string]: unknown | undefined;
|
|
385
|
-
} | boolean
|
|
385
|
+
} | boolean;
|
|
386
386
|
type OneOrManyFor_String = string | string[];
|
|
387
387
|
type CustomComponent = string | {
|
|
388
388
|
attribute: string;
|
|
@@ -1147,7 +1147,7 @@ interface DummyRuleMap {
|
|
|
1147
1147
|
"no-undefined"?: RuleNoConfig;
|
|
1148
1148
|
"no-underscore-dangle"?: RuleNoConfig | [AllowWarnDeny, NoUnderscoreDangleConfig];
|
|
1149
1149
|
"no-unexpected-multiline"?: RuleNoConfig;
|
|
1150
|
-
"no-unmodified-loop-condition"?: RuleNoConfig;
|
|
1150
|
+
"no-unmodified-loop-condition"?: RuleNoConfig | [AllowWarnDeny, NoUnmodifiedLoopCondition];
|
|
1151
1151
|
"no-unneeded-ternary"?: RuleNoConfig | [AllowWarnDeny, NoUnneededTernary];
|
|
1152
1152
|
"no-unreachable"?: RuleNoConfig;
|
|
1153
1153
|
"no-unreachable-loop"?: RuleNoConfig | [AllowWarnDeny, NoUnreachableLoopConfig];
|
|
@@ -1713,7 +1713,7 @@ interface DummyRuleMap {
|
|
|
1713
1713
|
"vue/valid-define-props"?: RuleNoConfig;
|
|
1714
1714
|
"vue/valid-next-tick"?: RuleNoConfig;
|
|
1715
1715
|
yoda?: RuleNoConfig | [AllowWarnDeny, AllowYoda] | [AllowWarnDeny, AllowYoda, YodaOptions];
|
|
1716
|
-
[k: string]: DummyRule | undefined;
|
|
1716
|
+
[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$1] | [AllowWarnDeny, RequireDirectExport] | [AllowWarnDeny, ReturnInComputedPropertyConfig] | [AllowWarnDeny, AllowYoda] | [AllowWarnDeny, AllowYoda, YodaOptions] | undefined;
|
|
1717
1717
|
}
|
|
1718
1718
|
interface AccessorPairsConfig {
|
|
1719
1719
|
/**
|
|
@@ -1992,7 +1992,7 @@ interface ImportExtensionsConfig {
|
|
|
1992
1992
|
* Per-extension rules.
|
|
1993
1993
|
*/
|
|
1994
1994
|
pattern?: {
|
|
1995
|
-
[k: string]: ExtensionRule;
|
|
1995
|
+
[k: string]: ExtensionRule | undefined;
|
|
1996
1996
|
};
|
|
1997
1997
|
}
|
|
1998
1998
|
interface PathGroupOverrideConfig {
|
|
@@ -2327,10 +2327,10 @@ interface NoLargeSnapshotsConfig {
|
|
|
2327
2327
|
maxSize?: number;
|
|
2328
2328
|
}
|
|
2329
2329
|
interface NoRestrictedTestMethodsConfig {
|
|
2330
|
-
[k: string]:
|
|
2330
|
+
[k: string]: string | null | undefined;
|
|
2331
2331
|
}
|
|
2332
2332
|
interface NoRestrictedMatchersConfig {
|
|
2333
|
-
[k: string]:
|
|
2333
|
+
[k: string]: string | null | undefined;
|
|
2334
2334
|
}
|
|
2335
2335
|
interface NoStandaloneExpectConfig {
|
|
2336
2336
|
/**
|
|
@@ -3727,6 +3727,13 @@ interface NoUnderscoreDangleConfig {
|
|
|
3727
3727
|
*/
|
|
3728
3728
|
enforceInMethodNames?: boolean;
|
|
3729
3729
|
}
|
|
3730
|
+
interface NoUnmodifiedLoopCondition {
|
|
3731
|
+
/**
|
|
3732
|
+
* Whether references in each branch of a conditional expression should be checked
|
|
3733
|
+
* independently instead of checking the result of the entire expression.
|
|
3734
|
+
*/
|
|
3735
|
+
checkConditionalExpressions?: boolean;
|
|
3736
|
+
}
|
|
3730
3737
|
interface NoUnneededTernary {
|
|
3731
3738
|
/**
|
|
3732
3739
|
* Whether to allow the default assignment pattern `x ? x : y`.
|
|
@@ -6120,9 +6127,11 @@ interface SwitchExhaustivenessCheckConfig {
|
|
|
6120
6127
|
*/
|
|
6121
6128
|
considerDefaultExhaustiveForUnions?: boolean;
|
|
6122
6129
|
/**
|
|
6123
|
-
* Regular expression pattern that
|
|
6124
|
-
*
|
|
6125
|
-
*
|
|
6130
|
+
* Regular expression pattern for a comment that acts as an omitted `default` case.
|
|
6131
|
+
* The comment must appear after the final case and the switch must not have a `default` case.
|
|
6132
|
+
* For union types, it suppresses the exhaustiveness check only when
|
|
6133
|
+
* `considerDefaultExhaustiveForUnions` is enabled.
|
|
6134
|
+
* Example: `"^skip default$"` to allow a switch ending in `// skip default`.
|
|
6126
6135
|
*/
|
|
6127
6136
|
defaultCaseCommentPattern?: string;
|
|
6128
6137
|
/**
|
|
@@ -6406,12 +6415,48 @@ interface NumericSeparatorsStyleConfig {
|
|
|
6406
6415
|
* Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).
|
|
6407
6416
|
* Controls how digits are grouped and when separators are applied.
|
|
6408
6417
|
*/
|
|
6409
|
-
binary?:
|
|
6418
|
+
binary?: {
|
|
6419
|
+
/**
|
|
6420
|
+
* The number of digits per group when inserting numeric separators.
|
|
6421
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6422
|
+
*/
|
|
6423
|
+
groupLength?: number;
|
|
6424
|
+
/**
|
|
6425
|
+
* The minimum number of digits required before grouping is applied.
|
|
6426
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6427
|
+
*/
|
|
6428
|
+
minimumDigits?: number;
|
|
6429
|
+
/**
|
|
6430
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6431
|
+
*
|
|
6432
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6433
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6434
|
+
*/
|
|
6435
|
+
onlyIfContainsSeparator?: boolean;
|
|
6436
|
+
};
|
|
6410
6437
|
/**
|
|
6411
6438
|
* Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).
|
|
6412
6439
|
* Controls how digits are grouped and when separators are applied.
|
|
6413
6440
|
*/
|
|
6414
|
-
hexadecimal?:
|
|
6441
|
+
hexadecimal?: {
|
|
6442
|
+
/**
|
|
6443
|
+
* The number of digits per group when inserting numeric separators.
|
|
6444
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6445
|
+
*/
|
|
6446
|
+
groupLength?: number;
|
|
6447
|
+
/**
|
|
6448
|
+
* The minimum number of digits required before grouping is applied.
|
|
6449
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6450
|
+
*/
|
|
6451
|
+
minimumDigits?: number;
|
|
6452
|
+
/**
|
|
6453
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6454
|
+
*
|
|
6455
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6456
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6457
|
+
*/
|
|
6458
|
+
onlyIfContainsSeparator?: boolean;
|
|
6459
|
+
};
|
|
6415
6460
|
/**
|
|
6416
6461
|
* Configuration for decimal numbers (integers, fraction parts, and exponents).
|
|
6417
6462
|
* Controls how digits are grouped and when separators are applied.
|
|
@@ -6421,26 +6466,25 @@ interface NumericSeparatorsStyleConfig {
|
|
|
6421
6466
|
* Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).
|
|
6422
6467
|
* Controls how digits are grouped and when separators are applied.
|
|
6423
6468
|
*/
|
|
6424
|
-
octal?:
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
minimumDigits?: number;
|
|
6469
|
+
octal?: {
|
|
6470
|
+
/**
|
|
6471
|
+
* The number of digits per group when inserting numeric separators.
|
|
6472
|
+
* For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
|
|
6473
|
+
*/
|
|
6474
|
+
groupLength?: number;
|
|
6475
|
+
/**
|
|
6476
|
+
* The minimum number of digits required before grouping is applied.
|
|
6477
|
+
* Values with fewer digits than this threshold will not be grouped.
|
|
6478
|
+
*/
|
|
6479
|
+
minimumDigits?: number;
|
|
6480
|
+
/**
|
|
6481
|
+
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6482
|
+
*
|
|
6483
|
+
* When `true`, numbers without separators are left as-is; when `false` (default),
|
|
6484
|
+
* grouping will be enforced for eligible numbers even if they don't include separators yet.
|
|
6485
|
+
*/
|
|
6486
|
+
onlyIfContainsSeparator?: boolean;
|
|
6487
|
+
};
|
|
6444
6488
|
/**
|
|
6445
6489
|
* Only enforce the rule when the numeric literal already contains a separator (`_`).
|
|
6446
6490
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.82.0",
|
|
4
4
|
"description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"commander": "^15.0.0",
|
|
31
31
|
"globals": "^17.0.0",
|
|
32
|
-
"oxc-parser": "^0.
|
|
32
|
+
"oxc-parser": "^0.148.0",
|
|
33
33
|
"tinyglobby": "^0.2.14"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"husky": "^9.1.7",
|
|
73
73
|
"lint-staged": "^17.0.0",
|
|
74
74
|
"next": "^16.0.0",
|
|
75
|
-
"oxfmt": "^0.
|
|
76
|
-
"oxlint": "^1.
|
|
75
|
+
"oxfmt": "^0.66.0",
|
|
76
|
+
"oxlint": "^1.82.0",
|
|
77
77
|
"oxlint-tsgolint": "^0.25.0",
|
|
78
|
-
"tsdown": "^0.
|
|
78
|
+
"tsdown": "^0.23.0",
|
|
79
79
|
"typescript": "^6.0.0",
|
|
80
80
|
"typescript-eslint": "^8.35.0",
|
|
81
81
|
"vitest": "^4.0.0"
|