...
|
...
|
@@ -11,11 +11,14 @@ const lintResult = { |
|
|
|
|
|
const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀
|
|
|
|
|
|
|
|
|
if (changeFiles.js) {
|
|
|
changeFiles.js = changeFiles.js.split('\n');
|
|
|
lintResult.js = shelljs.exec(`node_modules/.bin/eslint${ext} -c .eslintrc --cache --fix ${changeFiles.js}`);
|
|
|
}
|
|
|
|
|
|
if (changeFiles.css) {
|
|
|
changeFiles.css = changeFiles.css.split('\n');
|
|
|
lintResult.css = shelljs.exec(`node_modules/.bin/stylelint${ext} --config .stylelintrc ${changeFiles.css}`);
|
|
|
}
|
|
|
|
...
|
...
|
|