Skip to content

Commit 86830ac

Browse files
committed
fix: use module directory instead of entry file for eslintPath (#4233)
fixes #4231 (cherry picked from commit 992fe07)
1 parent f276598 commit 86830ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = (api, options) => {
5555
emitWarning: allWarnings,
5656
// only emit errors in production mode.
5757
emitError: allErrors,
58-
eslintPath: resolveModule('eslint', cwd) || require.resolve('eslint'),
58+
eslintPath: path.dirname(resolveModule('eslint/package.json', cwd)),
5959
formatter:
6060
loadModule('eslint/lib/formatters/codeframe', cwd, true) ||
6161
require('eslint/lib/formatters/codeframe')

0 commit comments

Comments
 (0)