Skip to content

Commit 0149444

Browse files
committed
fix: add cwd path prefix to globby patterns
1 parent f9b3328 commit 0149444

File tree

1 file changed

+10
-10
lines changed
  • packages/@vue/cli-plugin-eslint

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ const renamedArgs = {
1717
config: 'configFile'
1818
}
1919

20-
const defaultFilesToLint = [
21-
'src',
22-
'tests',
23-
// root config files
24-
'*.js',
25-
// .eslintrc files (ignored by default)
26-
'.*.js',
27-
'{src,tests}/**/.*.js'
28-
].filter(pattern => globby.sync(pattern).length)
29-
3020
module.exports = function lint (args = {}, api) {
3121
const path = require('path')
3222
const cwd = api.resolve('.')
@@ -41,6 +31,16 @@ module.exports = function lint (args = {}, api) {
4131
cwd
4232
}, argsConfig)
4333

34+
const defaultFilesToLint = [
35+
'src',
36+
'tests',
37+
// root config files
38+
'*.js',
39+
// .eslintrc files (ignored by default)
40+
'.*.js',
41+
'{src,tests}/**/.*.js'
42+
].filter(pattern => globby.sync(path.join(cwd, pattern)).length)
43+
4444
const engine = new CLIEngine(config)
4545
const files = args._ && args._.length
4646
? args._

0 commit comments

Comments
 (0)