@oxlint/migrate 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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-
|
|
2
|
+
import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-Bn5kidka.mjs";
|
|
3
3
|
import { program } from "commander";
|
|
4
4
|
import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -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.78.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,7 +10,7 @@
|
|
|
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.78.0_oxlint-tsgolint@0.24.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
16
|
type GlobalValue = ("readonly" | "writable" | "off") | undefined;
|
|
@@ -163,6 +163,18 @@ type ExportsStyleMode = "module.exports" | "exports";
|
|
|
163
163
|
type HandleCallbackErrConfig = string;
|
|
164
164
|
type NoMixedRequiresConfig = boolean | NoMixedRequiresOptions;
|
|
165
165
|
type ShorthandType = "always" | "methods" | "properties" | "consistent" | "consistent-as-needed" | "never";
|
|
166
|
+
/**
|
|
167
|
+
* Enforces consistent grouping of variable declarations.
|
|
168
|
+
*/
|
|
169
|
+
type OneVar = OneVarConfig;
|
|
170
|
+
/**
|
|
171
|
+
* Configuration accepted by the `one-var` rule.
|
|
172
|
+
*/
|
|
173
|
+
type OneVarConfig = OneVarMode | OneVarOptions;
|
|
174
|
+
/**
|
|
175
|
+
* Controls how variable declarators are grouped into declarations.
|
|
176
|
+
*/
|
|
177
|
+
type OneVarMode = "always" | "never" | "consecutive";
|
|
166
178
|
type Destructuring = "any" | "all";
|
|
167
179
|
type PreferDestructuringOption = PreferDestructuringTargetOption | PreferDestructuringAssignmentConfig;
|
|
168
180
|
type TerminationMethod = string | string[];
|
|
@@ -210,9 +222,7 @@ type ImportKind = "none" | "all" | "multiple" | "single";
|
|
|
210
222
|
type SortOrder = "desc" | "asc";
|
|
211
223
|
type ArrayOption = "array" | "array-simple" | "generic";
|
|
212
224
|
type ReadonlyArrayOption = "array" | "array-simple" | "generic";
|
|
213
|
-
type DirectiveConfigSchema = boolean | RequireDescription |
|
|
214
|
-
descriptionFormat?: string;
|
|
215
|
-
};
|
|
225
|
+
type DirectiveConfigSchema = boolean | RequireDescription | DescriptionFormatConfig;
|
|
216
226
|
type RequireDescription = "allow-with-description";
|
|
217
227
|
type ClassLiteralPropertyStyleOption = "fields" | "getters";
|
|
218
228
|
type PreferGenericType = "constructor" | "type-annotation";
|
|
@@ -955,6 +965,7 @@ interface DummyRuleMap {
|
|
|
955
965
|
"jsdoc/check-tag-names"?: RuleNoConfig | [AllowWarnDeny, CheckTagNamesConfig];
|
|
956
966
|
"jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
|
|
957
967
|
"jsdoc/implements-on-classes"?: RuleNoConfig;
|
|
968
|
+
"jsdoc/no-blank-blocks"?: RuleNoConfig | [AllowWarnDeny, NoBlankBlocks];
|
|
958
969
|
"jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
|
|
959
970
|
"jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
|
|
960
971
|
"jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
|
|
@@ -974,7 +985,7 @@ interface DummyRuleMap {
|
|
|
974
985
|
"jsdoc/require-yields-type"?: RuleNoConfig;
|
|
975
986
|
"jsx-a11y/alt-text"?: RuleNoConfig | [AllowWarnDeny, AltTextConfigSchema];
|
|
976
987
|
"jsx-a11y/anchor-ambiguous-text"?: RuleNoConfig | [AllowWarnDeny, AnchorAmbiguousTextConfig];
|
|
977
|
-
"jsx-a11y/anchor-has-content"?: RuleNoConfig;
|
|
988
|
+
"jsx-a11y/anchor-has-content"?: RuleNoConfig | [AllowWarnDeny, AnchorHasContentConfig];
|
|
978
989
|
"jsx-a11y/anchor-is-valid"?: RuleNoConfig | [AllowWarnDeny, AnchorIsValidConfig];
|
|
979
990
|
"jsx-a11y/aria-activedescendant-has-tabindex"?: RuleNoConfig;
|
|
980
991
|
"jsx-a11y/aria-props"?: RuleNoConfig;
|
|
@@ -1174,6 +1185,7 @@ interface DummyRuleMap {
|
|
|
1174
1185
|
"node/no-sync"?: RuleNoConfig | [AllowWarnDeny, NoSyncConfig];
|
|
1175
1186
|
"node/no-top-level-await"?: RuleNoConfig | [AllowWarnDeny, NoTopLevelAwaitConfig];
|
|
1176
1187
|
"object-shorthand"?: RuleNoConfig | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions];
|
|
1188
|
+
"one-var"?: RuleNoConfig | [AllowWarnDeny, OneVar];
|
|
1177
1189
|
"operator-assignment"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever];
|
|
1178
1190
|
"oxc/approx-constant"?: RuleNoConfig;
|
|
1179
1191
|
"oxc/bad-array-method-on-arguments"?: RuleNoConfig;
|
|
@@ -2470,6 +2482,12 @@ interface EmptyTagsConfig {
|
|
|
2470
2482
|
*/
|
|
2471
2483
|
tags?: string[];
|
|
2472
2484
|
}
|
|
2485
|
+
interface NoBlankBlocks {
|
|
2486
|
+
/**
|
|
2487
|
+
* Whether to automatically remove blank JSDoc blocks.
|
|
2488
|
+
*/
|
|
2489
|
+
enableFixer?: boolean;
|
|
2490
|
+
}
|
|
2473
2491
|
interface NoDefaultsConfig {
|
|
2474
2492
|
/**
|
|
2475
2493
|
* If true, report the presence of optional param names (square brackets) on `@param` tags.
|
|
@@ -2612,6 +2630,12 @@ interface AnchorAmbiguousTextConfig {
|
|
|
2612
2630
|
*/
|
|
2613
2631
|
words?: string[];
|
|
2614
2632
|
}
|
|
2633
|
+
interface AnchorHasContentConfig {
|
|
2634
|
+
/**
|
|
2635
|
+
* Additional custom component names to treat as anchor elements.
|
|
2636
|
+
*/
|
|
2637
|
+
components?: string[];
|
|
2638
|
+
}
|
|
2615
2639
|
interface AnchorIsValidConfig {
|
|
2616
2640
|
/**
|
|
2617
2641
|
* Sub-rule aspects to run.
|
|
@@ -4125,6 +4149,46 @@ interface ObjectShorthandOptions {
|
|
|
4125
4149
|
ignoreConstructors?: boolean;
|
|
4126
4150
|
methodsIgnorePattern?: string;
|
|
4127
4151
|
}
|
|
4152
|
+
/**
|
|
4153
|
+
* Options for configuring declaration grouping by kind or initialization state.
|
|
4154
|
+
*
|
|
4155
|
+
* `initialized` and `uninitialized` take precedence over the per-kind option for the
|
|
4156
|
+
* corresponding declarators.
|
|
4157
|
+
*/
|
|
4158
|
+
interface OneVarOptions {
|
|
4159
|
+
/**
|
|
4160
|
+
* Controls grouping for `await using` declarations.
|
|
4161
|
+
*/
|
|
4162
|
+
awaitUsing?: OneVarMode;
|
|
4163
|
+
/**
|
|
4164
|
+
* Controls grouping for `const` declarations.
|
|
4165
|
+
*/
|
|
4166
|
+
const?: OneVarMode;
|
|
4167
|
+
/**
|
|
4168
|
+
* Controls grouping for initialized declarators, overriding per-kind options.
|
|
4169
|
+
*/
|
|
4170
|
+
initialized?: OneVarMode;
|
|
4171
|
+
/**
|
|
4172
|
+
* Controls grouping for `let` declarations.
|
|
4173
|
+
*/
|
|
4174
|
+
let?: OneVarMode;
|
|
4175
|
+
/**
|
|
4176
|
+
* Keeps direct `require(...)` initializers separate from other initialized declarations.
|
|
4177
|
+
*/
|
|
4178
|
+
separateRequires?: boolean;
|
|
4179
|
+
/**
|
|
4180
|
+
* Controls grouping for uninitialized declarators, overriding per-kind options.
|
|
4181
|
+
*/
|
|
4182
|
+
uninitialized?: OneVarMode;
|
|
4183
|
+
/**
|
|
4184
|
+
* Controls grouping for `using` declarations.
|
|
4185
|
+
*/
|
|
4186
|
+
using?: OneVarMode;
|
|
4187
|
+
/**
|
|
4188
|
+
* Controls grouping for `var` declarations.
|
|
4189
|
+
*/
|
|
4190
|
+
var?: OneVarMode;
|
|
4191
|
+
}
|
|
4128
4192
|
interface NoAsyncEndpointHandlersConfig {
|
|
4129
4193
|
/**
|
|
4130
4194
|
* An array of names that are allowed to be async.
|
|
@@ -5121,6 +5185,9 @@ interface BanTsCommentConfig {
|
|
|
5121
5185
|
*/
|
|
5122
5186
|
"ts-nocheck"?: DirectiveConfigSchema;
|
|
5123
5187
|
}
|
|
5188
|
+
interface DescriptionFormatConfig {
|
|
5189
|
+
descriptionFormat?: string;
|
|
5190
|
+
}
|
|
5124
5191
|
interface ConsistentReturnConfig {
|
|
5125
5192
|
/**
|
|
5126
5193
|
* Treat explicit `return undefined` as equivalent to an unspecified return.
|
package/dist/src/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as main } from "../src-
|
|
1
|
+
import { t as main } from "../src-Bn5kidka.mjs";
|
|
2
2
|
export { main as default };
|
|
@@ -573,6 +573,7 @@ const styleRules = [
|
|
|
573
573
|
"no-ternary",
|
|
574
574
|
"no-useless-computed-key",
|
|
575
575
|
"object-shorthand",
|
|
576
|
+
"one-var",
|
|
576
577
|
"operator-assignment",
|
|
577
578
|
"prefer-arrow-callback",
|
|
578
579
|
"prefer-const",
|
|
@@ -649,6 +650,7 @@ const styleRules = [
|
|
|
649
650
|
"jest/prefer-todo",
|
|
650
651
|
"jest/require-hook",
|
|
651
652
|
"jest/require-top-level-describe",
|
|
653
|
+
"jsdoc/no-blank-blocks",
|
|
652
654
|
"jsdoc/require-throws-description",
|
|
653
655
|
"jsdoc/require-yields-description",
|
|
654
656
|
"node/callback-return",
|
|
@@ -1351,6 +1353,8 @@ var unsupportedRules = {
|
|
|
1351
1353
|
"unicorn/prefer-math-constants": "No need to implement, already covered by `oxc/approx-constant`.",
|
|
1352
1354
|
"unicorn/no-invalid-character-comparison": "No need to implement, already covered by `oxc/bad-char-at-comparison`.",
|
|
1353
1355
|
"unicorn/require-array-sort-compare": "No need to implement, already implemented by `typescript/require-array-sort-compare` via tsgolint.",
|
|
1356
|
+
"unicorn/no-barrel-files": "No need to implement separately; similar functionality is available via `oxc/no-barrel-file`",
|
|
1357
|
+
"unicorn/no-useless-concat": "No need to implement separately; `eslint/no-useless-concat` already covers the diagnostics and will implement the suggestion fixer.",
|
|
1354
1358
|
"eslint/no-negated-in-lhs": "Replaced by `eslint/no-unsafe-negation`, which we support.",
|
|
1355
1359
|
"eslint/no-catch-shadow": "Replaced by `eslint/no-shadow`.",
|
|
1356
1360
|
"eslint/id-blacklist": "Replaced by `eslint/id-denylist`.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0",
|
|
4
4
|
"description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"lint-staged": "^17.0.0",
|
|
74
74
|
"next": "^16.0.0",
|
|
75
75
|
"oxfmt": "^0.58.0",
|
|
76
|
-
"oxlint": "^1.
|
|
76
|
+
"oxlint": "^1.78.0",
|
|
77
77
|
"oxlint-tsgolint": "^0.24.0",
|
|
78
78
|
"tsdown": "^0.22.0",
|
|
79
79
|
"typescript": "^6.0.0",
|