diff --git a/packages/@vue/cli-plugin-eslint/index.js b/packages/@vue/cli-plugin-eslint/index.js index 385851676c..0051a0645f 100644 --- a/packages/@vue/cli-plugin-eslint/index.js +++ b/packages/@vue/cli-plugin-eslint/index.js @@ -53,7 +53,10 @@ module.exports = (api, options) => { emitWarning: allWarnings, // only emit errors in production mode. emitError: allErrors, - eslintPath: path.dirname(resolveModule('eslint/package.json', cwd)), + eslintPath: path.dirname( + resolveModule('eslint/package.json', cwd) || + resolveModule('eslint/package.json', __dirname) + ), formatter: loadModule('eslint/lib/formatters/codeframe', cwd, true) }) })