From f42871422ed651ad79f9e281e1a874f409d89069 Mon Sep 17 00:00:00 2001 From: Jens Eggerstedt Date: Fri, 4 May 2018 16:26:01 +0200 Subject: [PATCH] fix(tslint): don't change working directory --- packages/@vue/cli-plugin-typescript/lib/tslint.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/@vue/cli-plugin-typescript/lib/tslint.js b/packages/@vue/cli-plugin-typescript/lib/tslint.js index 6a7a7009be..b687a519c8 100644 --- a/packages/@vue/cli-plugin-typescript/lib/tslint.js +++ b/packages/@vue/cli-plugin-typescript/lib/tslint.js @@ -1,6 +1,5 @@ module.exports = function lint (args = {}, api, silent) { - process.chdir(api.resolve('.')) - + const cwd = api.resolve('.') const fs = require('fs') const path = require('path') const globby = require('globby') @@ -79,7 +78,7 @@ module.exports = function lint (args = {}, api, silent) { const stripTsExtension = str => str.replace(/\.vue\.ts\b/g, '.vue') - return globby(files).then(files => { + return globby(files, { cwd }).then(files => { return Promise.all(files.map(lint)) }).then(() => { if (silent) return