Showing
1 changed file
with
3 additions
and
0 deletions
@@ -11,11 +11,14 @@ const lintResult = { | @@ -11,11 +11,14 @@ const lintResult = { | ||
11 | 11 | ||
12 | const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀 | 12 | const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀 |
13 | 13 | ||
14 | + | ||
14 | if (changeFiles.js) { | 15 | if (changeFiles.js) { |
16 | + changeFiles.js = changeFiles.js.split('\n'); | ||
15 | lintResult.js = shelljs.exec(`node_modules/.bin/eslint${ext} -c .eslintrc --cache --fix ${changeFiles.js}`); | 17 | lintResult.js = shelljs.exec(`node_modules/.bin/eslint${ext} -c .eslintrc --cache --fix ${changeFiles.js}`); |
16 | } | 18 | } |
17 | 19 | ||
18 | if (changeFiles.css) { | 20 | if (changeFiles.css) { |
21 | + changeFiles.css = changeFiles.css.split('\n'); | ||
19 | lintResult.css = shelljs.exec(`node_modules/.bin/stylelint${ext} --config .stylelintrc ${changeFiles.css}`); | 22 | lintResult.css = shelljs.exec(`node_modules/.bin/stylelint${ext} --config .stylelintrc ${changeFiles.css}`); |
20 | } | 23 | } |
21 | 24 |
-
Please register or login to post a comment