Skip to content

Commit 1d0dede

Browse files
authored
fix(eslint-migrator): skip upgrade prompt if eslint v7 is detected (#5545)
Co-authored-by: EzioShiki <zhuzhenya@zuoyebang.com> Fixes #5533
1 parent b9b2fcd commit 1d0dede

File tree

1 file changed

+3
-3
lines changed
  • packages/@vue/cli-plugin-eslint/migrator

1 file changed

+3
-3
lines changed

packages/@vue/cli-plugin-eslint/migrator/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ module.exports = async (api) => {
2121
}
2222

2323
const localESLintMajor = semver.major(
24-
semver.maxSatisfying(['4.99.0', '5.99.0', '6.99.0'], localESLintRange) ||
24+
semver.maxSatisfying(['4.99.0', '5.99.0', '6.99.0', '7.99.0'], localESLintRange) ||
2525
// in case the user does not specify a typical caret range;
2626
// it is used as **fallback** because the user may have not previously
2727
// installed eslint yet, such as in the case that they are from v3.0.x
2828
require('eslint/package.json').version
2929
)
3030

31-
if (localESLintMajor === 6) {
31+
if (localESLintMajor >= 6) {
3232
return
3333
}
3434

@@ -37,7 +37,7 @@ module.exports = async (api) => {
3737
type: 'confirm',
3838
message:
3939
`Your current ESLint version is v${localESLintMajor}.\n` +
40-
`The lastest major version is v6.\n` +
40+
`The latest major version which supported by vue-cli is v6.\n` +
4141
`Do you want to upgrade? (May contain breaking changes)\n`
4242
}])
4343

0 commit comments

Comments
 (0)