Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-migrator): skip upgrade prompt if eslint v7 is installed (#5545) #5545

Merged
merged 1 commit into from Jun 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/@vue/cli-plugin-eslint/migrator/index.js
Expand Up @@ -21,14 +21,14 @@ module.exports = async (api) => {
}

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

if (localESLintMajor === 6) {
if (localESLintMajor >= 6) {
return
}

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

Expand Down