Authored by ccbikai

支持检查 scss 语法

... ... @@ -32,13 +32,13 @@ if (changeFiles.js) {
if (changeFiles.css) {
changeFiles.css = changeFiles.css.replace(/\n/g, ' ');
lintResult.css = shelljs.exec(`${lintPath.css}${ext} --config .stylelintrc ${changeFiles.css}`);
lintResult.css = shelljs.exec(`${lintPath.css}${ext} --syntax scss --config .stylelintrc ${changeFiles.css}`);
}
if (changeFiles.vue) {
changeFiles.vue = changeFiles.vue.replace(/\n/g, ' ');
lintResult.vueScript = shelljs.exec(`${lintPath.js}${ext} -c .eslintrc --cache --fix ${changeFiles.vue}`);
lintResult.vueStyle = shelljs.exec(`${lintPath.css}${ext} --extract --config .stylelintrc ${changeFiles.vue}`);
lintResult.vueStyle = shelljs.exec(`${lintPath.css}${ext} --syntax scss --extract --config .stylelintrc ${changeFiles.vue}`); // eslint-disable-line
}
const errorCode = lintResult.js.code || lintResult.css.code || lintResult.vueScript.code || lintResult.vueStyle.code;
... ...
... ... @@ -13,8 +13,8 @@
"online": "NODE_ENV=\"production\" node app.js",
"debug": "DEBUG=\"express:*\" nodemon -e js,hbs -i public/ app.js",
"lint-js": "eslint -c .eslintrc --cache --fix .",
"lint-css": "stylelint --config .stylelintrc public/scss/**/*.css",
"lint-vue": "stylelint --extract --config .stylelintrc public/vue/**/*.vue || eslint -c .eslintrc --cache --fix public/vue/**/*.vue",
"lint-css": "stylelint --syntax scss --config .stylelintrc public/scss/**/*.css",
"lint-vue": "stylelint --syntax scss --extract --config .stylelintrc public/vue/**/*.vue || eslint -c .eslintrc --cache --fix public/vue/**/*.vue",
"precommit": "node lint.js"
},
"license": "MIT",
... ...