fix: fix eslint path resolution in vue serve (#4246)

fixes #4237
This commit is contained in:
Haoqun Jiang
2019-07-06 17:10:02 +08:00
committed by GitHub
parent 8b8bb99316
commit 0ba505ca02
+4 -1
View File
@@ -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)
})
})