8000 fix: fix eslint path resolution in `vue serve` (#4246) · sarvex/vue-cli@0ba505c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ba505c

Browse files
authored
fix: fix eslint path resolution in vue serve (vuejs#4246)
fixes vuejs#4237
1 parent 8b8bb99 commit 0ba505c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ module.exports = (api, options) => {
5353
emitWarning: allWarnings,
5454
// only emit errors in production mode.
5555
emitError: allErrors,
56-
eslintPath: path.dirname(resolveModule('eslint/package.json', cwd)),
56+
eslintPath: path.dirname(
57+
resolveModule('eslint/package.json', cwd) ||
58+
resolveModule('eslint/package.json', __dirname)
59+
),
5760
formatter: loadModule('eslint/lib/formatters/codeframe', cwd, true)
5861
})
5962
})

0 commit comments

Comments
 (0)
0