@oxlint/migrate 1.66.0 → 1.68.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-DFohD9q9.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.68.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/oxlint@1.
|
|
1
|
+
//#region node_modules/.pnpm/oxlint@1.68.0_oxlint-tsgolint@0.23.0/node_modules/oxlint/dist/index.d.ts
|
|
2
2
|
//#region src-js/package/config.generated.d.ts
|
|
3
3
|
type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
|
|
4
4
|
type GlobalValue = "readonly" | "writable" | "off";
|
|
@@ -451,6 +451,16 @@ interface OxlintOverride {
|
|
|
451
451
|
* Environments enable and disable collections of global variables.
|
|
452
452
|
*/
|
|
453
453
|
env?: OxlintEnv;
|
|
454
|
+
/**
|
|
455
|
+
* A list of glob patterns to exclude from this override.
|
|
456
|
+
*
|
|
457
|
+
* Files matching these patterns are not globally ignored; this override
|
|
458
|
+
* simply does not apply to them.
|
|
459
|
+
*
|
|
460
|
+
* ## Example
|
|
461
|
+
* `[ "*.generated.ts", "fixtures/**" ]`
|
|
462
|
+
*/
|
|
463
|
+
excludeFiles?: GlobSet;
|
|
454
464
|
/**
|
|
455
465
|
* A list of glob patterns to override.
|
|
456
466
|
*
|
|
@@ -618,6 +628,7 @@ interface DummyRuleMap {
|
|
|
618
628
|
"jsdoc/require-throws-description"?: DummyRule;
|
|
619
629
|
"jsdoc/require-throws-type"?: DummyRule;
|
|
620
630
|
"jsdoc/require-yields"?: DummyRule;
|
|
631
|
+
"jsdoc/require-yields-description"?: DummyRule;
|
|
621
632
|
"jsdoc/require-yields-type"?: DummyRule;
|
|
622
633
|
"jsx-a11y/alt-text"?: DummyRule;
|
|
623
634
|
"jsx-a11y/anchor-ambiguous-text"?: DummyRule;
|
|
@@ -808,6 +819,7 @@ interface DummyRuleMap {
|
|
|
808
819
|
"no-void"?: DummyRule;
|
|
809
820
|
"no-warning-comments"?: DummyRule;
|
|
810
821
|
"no-with"?: DummyRule;
|
|
822
|
+
"node/callback-return"?: DummyRule;
|
|
811
823
|
"node/global-require"?: DummyRule;
|
|
812
824
|
"node/handle-callback-err"?: DummyRule;
|
|
813
825
|
"node/no-exports-assign"?: DummyRule;
|
|
@@ -846,6 +858,7 @@ interface DummyRuleMap {
|
|
|
846
858
|
"prefer-const"?: DummyRule;
|
|
847
859
|
"prefer-destructuring"?: DummyRule;
|
|
848
860
|
"prefer-exponentiation-operator"?: DummyRule;
|
|
861
|
+
"prefer-named-capture-group"?: DummyRule;
|
|
849
862
|
"prefer-numeric-literals"?: DummyRule;
|
|
850
863
|
"prefer-object-has-own"?: DummyRule;
|
|
851
864
|
"prefer-object-spread"?: DummyRule;
|
|
@@ -962,6 +975,7 @@ interface DummyRuleMap {
|
|
|
962
975
|
"typescript/explicit-function-return-type"?: DummyRule;
|
|
963
976
|
"typescript/explicit-member-accessibility"?: DummyRule;
|
|
964
977
|
"typescript/explicit-module-boundary-types"?: DummyRule;
|
|
978
|
+
"typescript/method-signature-style"?: DummyRule;
|
|
965
979
|
"typescript/no-array-delete"?: DummyRule;
|
|
966
980
|
"typescript/no-base-to-string"?: DummyRule;
|
|
967
981
|
"typescript/no-confusing-non-null-assertion"?: DummyRule;
|
|
@@ -1067,6 +1081,7 @@ interface DummyRuleMap {
|
|
|
1067
1081
|
"unicorn/escape-case"?: DummyRule;
|
|
1068
1082
|
"unicorn/explicit-length-check"?: DummyRule;
|
|
1069
1083
|
"unicorn/filename-case"?: DummyRule;
|
|
1084
|
+
"unicorn/import-style"?: DummyRule;
|
|
1070
1085
|
"unicorn/new-for-builtins"?: DummyRule;
|
|
1071
1086
|
"unicorn/no-abusive-eslint-disable"?: DummyRule;
|
|
1072
1087
|
"unicorn/no-accessor-recursion"?: DummyRule;
|
|
@@ -1259,31 +1274,44 @@ interface DummyRuleMap {
|
|
|
1259
1274
|
"vitest/valid-expect-in-promise"?: DummyRule;
|
|
1260
1275
|
"vitest/valid-title"?: DummyRule;
|
|
1261
1276
|
"vitest/warn-todo"?: DummyRule;
|
|
1277
|
+
"vue/component-definition-name-casing"?: DummyRule;
|
|
1262
1278
|
"vue/define-emits-declaration"?: DummyRule;
|
|
1263
1279
|
"vue/define-props-declaration"?: DummyRule;
|
|
1264
1280
|
"vue/define-props-destructuring"?: DummyRule;
|
|
1265
1281
|
"vue/max-props"?: DummyRule;
|
|
1266
1282
|
"vue/no-arrow-functions-in-watch"?: DummyRule;
|
|
1283
|
+
"vue/no-computed-properties-in-data"?: DummyRule;
|
|
1267
1284
|
"vue/no-deprecated-data-object-declaration"?: DummyRule;
|
|
1268
1285
|
"vue/no-deprecated-delete-set"?: DummyRule;
|
|
1269
1286
|
"vue/no-deprecated-destroyed-lifecycle"?: DummyRule;
|
|
1270
1287
|
"vue/no-deprecated-events-api"?: DummyRule;
|
|
1271
1288
|
"vue/no-deprecated-model-definition"?: DummyRule;
|
|
1289
|
+
"vue/no-deprecated-props-default-this"?: DummyRule;
|
|
1272
1290
|
"vue/no-deprecated-vue-config-keycodes"?: DummyRule;
|
|
1273
1291
|
"vue/no-export-in-script-setup"?: DummyRule;
|
|
1292
|
+
"vue/no-expose-after-await"?: DummyRule;
|
|
1274
1293
|
"vue/no-import-compiler-macros"?: DummyRule;
|
|
1275
1294
|
"vue/no-lifecycle-after-await"?: DummyRule;
|
|
1276
1295
|
"vue/no-multiple-slot-args"?: DummyRule;
|
|
1277
1296
|
"vue/no-required-prop-with-default"?: DummyRule;
|
|
1297
|
+
"vue/no-reserved-component-names"?: DummyRule;
|
|
1298
|
+
"vue/no-shared-component-data"?: DummyRule;
|
|
1278
1299
|
"vue/no-this-in-before-route-enter"?: DummyRule;
|
|
1300
|
+
"vue/no-watch-after-await"?: DummyRule;
|
|
1279
1301
|
"vue/prefer-import-from-vue"?: DummyRule;
|
|
1280
1302
|
"vue/require-default-export"?: DummyRule;
|
|
1303
|
+
"vue/require-prop-type-constructor"?: DummyRule;
|
|
1304
|
+
"vue/require-render-return"?: DummyRule;
|
|
1305
|
+
"vue/require-slots-as-functions"?: DummyRule;
|
|
1281
1306
|
"vue/require-typed-ref"?: DummyRule;
|
|
1282
1307
|
"vue/return-in-computed-property"?: DummyRule;
|
|
1308
|
+
"vue/return-in-emits-validator"?: DummyRule;
|
|
1283
1309
|
"vue/valid-define-emits"?: DummyRule;
|
|
1310
|
+
"vue/valid-define-options"?: DummyRule;
|
|
1284
1311
|
"vue/valid-define-props"?: DummyRule;
|
|
1312
|
+
"vue/valid-next-tick"?: DummyRule;
|
|
1285
1313
|
yoda?: DummyRule;
|
|
1286
|
-
[k: string]: DummyRule;
|
|
1314
|
+
[k: string]: DummyRule | undefined;
|
|
1287
1315
|
}
|
|
1288
1316
|
/**
|
|
1289
1317
|
* Configure the behavior of linter plugins.
|
package/dist/src/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as main } from "../src-
|
|
1
|
+
import { t as main } from "../src-DFohD9q9.mjs";
|
|
2
2
|
export { main as default };
|
|
@@ -570,6 +570,7 @@ const styleRules = [
|
|
|
570
570
|
"prefer-const",
|
|
571
571
|
"prefer-destructuring",
|
|
572
572
|
"prefer-exponentiation-operator",
|
|
573
|
+
"prefer-named-capture-group",
|
|
573
574
|
"prefer-numeric-literals",
|
|
574
575
|
"prefer-object-has-own",
|
|
575
576
|
"prefer-object-spread",
|
|
@@ -642,6 +643,8 @@ const styleRules = [
|
|
|
642
643
|
"jest/require-hook",
|
|
643
644
|
"jest/require-top-level-describe",
|
|
644
645
|
"jsdoc/require-throws-description",
|
|
646
|
+
"jsdoc/require-yields-description",
|
|
647
|
+
"node/callback-return",
|
|
645
648
|
"node/global-require",
|
|
646
649
|
"node/no-exports-assign",
|
|
647
650
|
"promise/avoid-new",
|
|
@@ -675,6 +678,7 @@ const styleRules = [
|
|
|
675
678
|
"typescript/consistent-type-exports",
|
|
676
679
|
"typescript/consistent-type-imports",
|
|
677
680
|
"typescript/dot-notation",
|
|
681
|
+
"typescript/method-signature-style",
|
|
678
682
|
"typescript/no-empty-interface",
|
|
679
683
|
"typescript/no-inferrable-types",
|
|
680
684
|
"typescript/no-unnecessary-qualifier",
|
|
@@ -785,6 +789,7 @@ const styleRules = [
|
|
|
785
789
|
"vitest/prefer-todo",
|
|
786
790
|
"vitest/require-hook",
|
|
787
791
|
"vitest/require-top-level-describe",
|
|
792
|
+
"vue/component-definition-name-casing",
|
|
788
793
|
"vue/define-emits-declaration",
|
|
789
794
|
"vue/define-props-declaration",
|
|
790
795
|
"vue/define-props-destructuring",
|
|
@@ -924,6 +929,7 @@ const restrictionRules = [
|
|
|
924
929
|
"typescript/prefer-literal-enum-member",
|
|
925
930
|
"typescript/promise-function-async",
|
|
926
931
|
"typescript/use-unknown-in-catch-callback-variable",
|
|
932
|
+
"unicorn/import-style",
|
|
927
933
|
"unicorn/no-abusive-eslint-disable",
|
|
928
934
|
"unicorn/no-anonymous-default-export",
|
|
929
935
|
"unicorn/no-array-for-each",
|
|
@@ -1164,19 +1170,31 @@ const correctnessRules = [
|
|
|
1164
1170
|
"vitest/valid-title",
|
|
1165
1171
|
"vitest/warn-todo",
|
|
1166
1172
|
"vue/no-arrow-functions-in-watch",
|
|
1173
|
+
"vue/no-computed-properties-in-data",
|
|
1167
1174
|
"vue/no-deprecated-data-object-declaration",
|
|
1168
1175
|
"vue/no-deprecated-delete-set",
|
|
1169
1176
|
"vue/no-deprecated-destroyed-lifecycle",
|
|
1170
1177
|
"vue/no-deprecated-events-api",
|
|
1171
1178
|
"vue/no-deprecated-model-definition",
|
|
1179
|
+
"vue/no-deprecated-props-default-this",
|
|
1172
1180
|
"vue/no-deprecated-vue-config-keycodes",
|
|
1173
1181
|
"vue/no-export-in-script-setup",
|
|
1182
|
+
"vue/no-expose-after-await",
|
|
1174
1183
|
"vue/no-lifecycle-after-await",
|
|
1184
|
+
"vue/no-reserved-component-names",
|
|
1185
|
+
"vue/no-shared-component-data",
|
|
1175
1186
|
"vue/no-this-in-before-route-enter",
|
|
1187
|
+
"vue/no-watch-after-await",
|
|
1176
1188
|
"vue/prefer-import-from-vue",
|
|
1189
|
+
"vue/require-prop-type-constructor",
|
|
1190
|
+
"vue/require-render-return",
|
|
1191
|
+
"vue/require-slots-as-functions",
|
|
1177
1192
|
"vue/return-in-computed-property",
|
|
1193
|
+
"vue/return-in-emits-validator",
|
|
1178
1194
|
"vue/valid-define-emits",
|
|
1195
|
+
"vue/valid-define-options",
|
|
1179
1196
|
"vue/valid-define-props",
|
|
1197
|
+
"vue/valid-next-tick",
|
|
1180
1198
|
"typescript/no-dupe-class-members",
|
|
1181
1199
|
"typescript/no-loss-of-precision",
|
|
1182
1200
|
"typescript/no-unused-expressions",
|
|
@@ -1312,6 +1330,7 @@ var unsupportedRules = {
|
|
|
1312
1330
|
"n/no-restricted-import": "No need to implement, already implemented by `no-restricted-imports` rule.",
|
|
1313
1331
|
"n/no-restricted-require": "No need to implement, already implemented by `no-restricted-imports` rule.",
|
|
1314
1332
|
"import/order": "Not implementing this in Oxlint as its behavior is covered very well by [Oxfmt's import sorting](https://oxc.rs/docs/guide/usage/formatter/sorting.html).",
|
|
1333
|
+
"unicorn/template-indent": "Stylistic rule.",
|
|
1315
1334
|
"jsdoc/type-formatting": "Experimental rule in the original plugin, may reconsider once stable.",
|
|
1316
1335
|
"jsdoc/convert-to-jsdoc-comments": "Experimental rule in the original plugin, may reconsider once stable.",
|
|
1317
1336
|
"jsdoc/check-examples": "Deprecated.",
|
|
@@ -1320,7 +1339,6 @@ var unsupportedRules = {
|
|
|
1320
1339
|
"jest/no-error-equal": "Requires type information. Not currently possible to implement in oxlint.",
|
|
1321
1340
|
"jest/valid-expect-with-promise": "Requires type information. Not currently possible to implement in oxlint.",
|
|
1322
1341
|
"vitest/unbound-method": "Requires type information. Not currently possible to implement in oxlint.",
|
|
1323
|
-
"vitest/prefer-vi-mocked": "Requires type information. Not currently possible to implement in oxlint.",
|
|
1324
1342
|
"eslint/no-process-env": "Deprecated, replaced by `node/no-process-env`, which we already support.",
|
|
1325
1343
|
"eslint/no-new-require": "Deprecated, replaced by `node/no-new-require`, which we already support.",
|
|
1326
1344
|
"eslint/no-buffer-constructor": "Replaced by `node/no-deprecated-api`.",
|
|
@@ -1367,6 +1385,8 @@ var unsupportedRules = {
|
|
|
1367
1385
|
"react/use-memo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1368
1386
|
"react/incompatible-library": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1369
1387
|
"react/automatic-effect-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1388
|
+
"react/memo-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1389
|
+
"react/exhaustive-effect-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1370
1390
|
"react/capitalized-calls": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1371
1391
|
"react/fbt": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
1372
1392
|
"react/fire": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
|
|
@@ -1393,6 +1413,7 @@ var unsupportedRules = {
|
|
|
1393
1413
|
"react/require-optimization": "This rule only applies to legacy class components, which are not widely used in modern React.",
|
|
1394
1414
|
"react/prefer-read-only-props": "This rule is niche and primarily applies to legacy class components, which are not widely used in modern React.",
|
|
1395
1415
|
"react/prop-types": "PropTypes are ignored in React 19, and TypeScript + the `no-unsafe-xxx` rules already catches unsafe props in most cases.",
|
|
1416
|
+
"react/prefer-stateless-function": "Superseded by `react/prefer-function-component`, which we support.",
|
|
1396
1417
|
"typescript/sort-type-constituents": "Deprecated, replaced by `perfectionist/sort-intersection-types` and `perfectionist/sort-union-types` rules.",
|
|
1397
1418
|
"typescript/no-type-alias": "Deprecated, replaced by `typescript-eslint/consistent-type-definitions` rule.",
|
|
1398
1419
|
"typescript/typedef": "Deprecated.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.68.0",
|
|
4
4
|
"description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"commander": "^14.0.0",
|
|
42
42
|
"globals": "^17.0.0",
|
|
43
|
-
"oxc-parser": "^0.
|
|
43
|
+
"oxc-parser": "^0.132.0",
|
|
44
44
|
"tinyglobby": "^0.2.14"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"husky": "^9.1.7",
|
|
84
84
|
"lint-staged": "^16.1.2",
|
|
85
85
|
"next": "^16.0.0",
|
|
86
|
-
"oxfmt": "^0.
|
|
87
|
-
"oxlint": "^1.
|
|
88
|
-
"oxlint-tsgolint": "^0.
|
|
86
|
+
"oxfmt": "^0.51.0",
|
|
87
|
+
"oxlint": "^1.68.0",
|
|
88
|
+
"oxlint-tsgolint": "^0.23.0",
|
|
89
89
|
"tsdown": "^0.22.0",
|
|
90
90
|
"typescript": "^6.0.0",
|
|
91
91
|
"typescript-eslint": "^8.35.0",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"lint-staged": {
|
|
95
95
|
"*": "oxfmt --no-error-on-unmatched-pattern"
|
|
96
96
|
},
|
|
97
|
-
"packageManager": "pnpm@11.
|
|
97
|
+
"packageManager": "pnpm@11.2.2"
|
|
98
98
|
}
|