@oxlint/migrate 1.68.0 → 1.70.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 +2 -2
- package/dist/src/index.d.mts +5526 -803
- package/dist/src/index.mjs +1 -1
- package/dist/{src-DFohD9q9.mjs → src-Cuy3Jdkv.mjs} +17 -3
- package/package.json +5 -5
package/dist/src/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as main } from "../src-
|
|
1
|
+
import { t as main } from "../src-Cuy3Jdkv.mjs";
|
|
2
2
|
export { main as default };
|
|
@@ -519,6 +519,7 @@ const pedanticRules = [
|
|
|
519
519
|
"unicorn/prefer-prototype-methods",
|
|
520
520
|
"unicorn/prefer-query-selector",
|
|
521
521
|
"unicorn/prefer-regexp-test",
|
|
522
|
+
"unicorn/prefer-single-call",
|
|
522
523
|
"unicorn/prefer-string-replace-all",
|
|
523
524
|
"unicorn/prefer-string-slice",
|
|
524
525
|
"unicorn/prefer-top-level-await",
|
|
@@ -716,6 +717,7 @@ const styleRules = [
|
|
|
716
717
|
"unicorn/prefer-classlist-toggle",
|
|
717
718
|
"unicorn/prefer-default-parameters",
|
|
718
719
|
"unicorn/prefer-dom-node-text-content",
|
|
720
|
+
"unicorn/prefer-export-from",
|
|
719
721
|
"unicorn/prefer-global-this",
|
|
720
722
|
"unicorn/prefer-includes",
|
|
721
723
|
"unicorn/prefer-keyboard-event-key",
|
|
@@ -738,6 +740,7 @@ const styleRules = [
|
|
|
738
740
|
"unicorn/switch-case-break-position",
|
|
739
741
|
"unicorn/text-encoding-identifier-case",
|
|
740
742
|
"unicorn/throw-new-error",
|
|
743
|
+
"vitest/consistent-each-for",
|
|
741
744
|
"vitest/consistent-test-filename",
|
|
742
745
|
"vitest/consistent-test-it",
|
|
743
746
|
"vitest/consistent-vitest-vi",
|
|
@@ -793,6 +796,11 @@ const styleRules = [
|
|
|
793
796
|
"vue/define-emits-declaration",
|
|
794
797
|
"vue/define-props-declaration",
|
|
795
798
|
"vue/define-props-destructuring",
|
|
799
|
+
"vue/next-tick-style",
|
|
800
|
+
"vue/prop-name-casing",
|
|
801
|
+
"vue/require-default-prop",
|
|
802
|
+
"vue/require-direct-export",
|
|
803
|
+
"vue/require-prop-types",
|
|
796
804
|
"vue/require-typed-ref",
|
|
797
805
|
"typescript/default-param-last",
|
|
798
806
|
"typescript/init-declarations",
|
|
@@ -844,6 +852,7 @@ const suspiciousRules = [
|
|
|
844
852
|
"typescript/no-unsafe-type-assertion",
|
|
845
853
|
"unicorn/consistent-function-scoping",
|
|
846
854
|
"unicorn/no-accessor-recursion",
|
|
855
|
+
"unicorn/no-array-fill-with-reference-type",
|
|
847
856
|
"unicorn/no-array-reverse",
|
|
848
857
|
"unicorn/no-array-sort",
|
|
849
858
|
"unicorn/no-instanceof-builtins",
|
|
@@ -904,6 +913,7 @@ const restrictionRules = [
|
|
|
904
913
|
"react/forbid-dom-props",
|
|
905
914
|
"react/forbid-elements",
|
|
906
915
|
"react/jsx-filename-extension",
|
|
916
|
+
"react/jsx-no-literals",
|
|
907
917
|
"react/no-clone-element",
|
|
908
918
|
"react/no-danger",
|
|
909
919
|
"react/no-multi-comp",
|
|
@@ -1151,7 +1161,6 @@ const correctnessRules = [
|
|
|
1151
1161
|
"unicorn/no-useless-spread",
|
|
1152
1162
|
"unicorn/prefer-set-size",
|
|
1153
1163
|
"unicorn/prefer-string-starts-ends-with",
|
|
1154
|
-
"vitest/consistent-each-for",
|
|
1155
1164
|
"vitest/expect-expect",
|
|
1156
1165
|
"vitest/hoisted-apis-on-top",
|
|
1157
1166
|
"vitest/no-conditional-expect",
|
|
@@ -1178,11 +1187,15 @@ const correctnessRules = [
|
|
|
1178
1187
|
"vue/no-deprecated-model-definition",
|
|
1179
1188
|
"vue/no-deprecated-props-default-this",
|
|
1180
1189
|
"vue/no-deprecated-vue-config-keycodes",
|
|
1190
|
+
"vue/no-dupe-keys",
|
|
1181
1191
|
"vue/no-export-in-script-setup",
|
|
1182
1192
|
"vue/no-expose-after-await",
|
|
1183
1193
|
"vue/no-lifecycle-after-await",
|
|
1184
1194
|
"vue/no-reserved-component-names",
|
|
1195
|
+
"vue/no-reserved-keys",
|
|
1196
|
+
"vue/no-reserved-props",
|
|
1185
1197
|
"vue/no-shared-component-data",
|
|
1198
|
+
"vue/no-side-effects-in-computed-properties",
|
|
1186
1199
|
"vue/no-this-in-before-route-enter",
|
|
1187
1200
|
"vue/no-watch-after-await",
|
|
1188
1201
|
"vue/prefer-import-from-vue",
|
|
@@ -1221,6 +1234,7 @@ const nurseryRules = [
|
|
|
1221
1234
|
"import/export",
|
|
1222
1235
|
"import/named",
|
|
1223
1236
|
"promise/no-return-in-finally",
|
|
1237
|
+
"react/react-compiler",
|
|
1224
1238
|
"react/require-render-return",
|
|
1225
1239
|
"typescript/no-unnecessary-condition",
|
|
1226
1240
|
"typescript/prefer-optional-chain",
|
|
@@ -1411,6 +1425,7 @@ var unsupportedRules = {
|
|
|
1411
1425
|
"react/sort-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant if you use the PropTypes package. Also stylistic.",
|
|
1412
1426
|
"react/static-property-placement": "This rule only applies to legacy class components, which are not widely used in modern React.",
|
|
1413
1427
|
"react/require-optimization": "This rule only applies to legacy class components, which are not widely used in modern React.",
|
|
1428
|
+
"react/require-default-props": "`defaultProps` is removed entirely in React 19, this rule is no longer relevant.",
|
|
1414
1429
|
"react/prefer-read-only-props": "This rule is niche and primarily applies to legacy class components, which are not widely used in modern React.",
|
|
1415
1430
|
"react/prop-types": "PropTypes are ignored in React 19, and TypeScript + the `no-unsafe-xxx` rules already catches unsafe props in most cases.",
|
|
1416
1431
|
"react/prefer-stateless-function": "Superseded by `react/prefer-function-component`, which we support.",
|
|
@@ -1693,7 +1708,6 @@ function buildUnsupportedRuleExplanations() {
|
|
|
1693
1708
|
//#region src/plugins_rules.ts
|
|
1694
1709
|
const allRules = Object.values(rules_exports).flat();
|
|
1695
1710
|
const unsupportedRuleExplanations = buildUnsupportedRuleExplanations();
|
|
1696
|
-
const OXFMT_SORTING_DOCS_URL = "https://oxc.rs/docs/guide/usage/formatter/sorting.html";
|
|
1697
1711
|
const oxfmtImportSortingRules = new Set(["sort-imports", "perfectionist/sort-imports"]);
|
|
1698
1712
|
/**
|
|
1699
1713
|
* checks if value is validSet, or if validSet is an array, check if value is first value of it
|
|
@@ -1713,7 +1727,7 @@ const isWarnValue = (value) => isValueInSet(value, ["warn", 1]);
|
|
|
1713
1727
|
const isErrorValue = (value) => isValueInSet(value, ["error", 2]);
|
|
1714
1728
|
const isOxfmtImportSortingRule = (rule) => oxfmtImportSortingRules.has(rule);
|
|
1715
1729
|
const addOxfmtImportSortingWarning = (options) => {
|
|
1716
|
-
options?.reporter?.addWarning("ESLint import-sorting rules like `sort-imports` were not migrated because they conflict with Oxfmt's import sorting.\nUse Oxfmt's `sortImports` formatter option instead. It is based on `eslint-plugin-perfectionist/sort-imports`, is disabled by default, and will need to be enabled.\
|
|
1730
|
+
options?.reporter?.addWarning("ESLint import-sorting rules like `sort-imports` were not migrated because they conflict with Oxfmt's import sorting.\nUse Oxfmt's `sortImports` formatter option instead. It is based on `eslint-plugin-perfectionist/sort-imports`, is disabled by default, and will need to be enabled.\nhttps://oxc.rs/docs/guide/usage/formatter/sorting.html");
|
|
1717
1731
|
};
|
|
1718
1732
|
const normalizeSeverityValue = (value) => {
|
|
1719
1733
|
if (value === void 0) return value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.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.135.0",
|
|
44
44
|
"tinyglobby": "^0.2.14"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -83,8 +83,8 @@
|
|
|
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.
|
|
86
|
+
"oxfmt": "^0.54.0",
|
|
87
|
+
"oxlint": "^1.70.0",
|
|
88
88
|
"oxlint-tsgolint": "^0.23.0",
|
|
89
89
|
"tsdown": "^0.22.0",
|
|
90
90
|
"typescript": "^6.0.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.5.3"
|
|
98
98
|
}
|