mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-12 14:58:26 -05:00
fix: add cwd path prefix to globby patterns
This commit is contained in:
@@ -17,16 +17,6 @@ const renamedArgs = {
|
||||
config: 'configFile'
|
||||
}
|
||||
|
||||
const defaultFilesToLint = [
|
||||
'src',
|
||||
'tests',
|
||||
// root config files
|
||||
'*.js',
|
||||
// .eslintrc files (ignored by default)
|
||||
'.*.js',
|
||||
'{src,tests}/**/.*.js'
|
||||
].filter(pattern => globby.sync(pattern).length)
|
||||
|
||||
module.exports = function lint (args = {}, api) {
|
||||
const path = require('path')
|
||||
const cwd = api.resolve('.')
|
||||
@@ -41,6 +31,16 @@ module.exports = function lint (args = {}, api) {
|
||||
cwd
|
||||
}, argsConfig)
|
||||
|
||||
const defaultFilesToLint = [
|
||||
'src',
|
||||
'tests',
|
||||
// root config files
|
||||
'*.js',
|
||||
// .eslintrc files (ignored by default)
|
||||
'.*.js',
|
||||
'{src,tests}/**/.*.js'
|
||||
].filter(pattern => globby.sync(path.join(cwd, pattern)).length)
|
||||
|
||||
const engine = new CLIEngine(config)
|
||||
const files = args._ && args._.length
|
||||
? args._
|
||||
|
||||
Reference in New Issue
Block a user