今天我会使用Gulp.js来自动检测SCSS和JavaScript文件的语法错误和警告。 我决定检测SCSS文件而不是CSS文件,因为检测生成的CSS没有意义。但是你也可以用gulp-csslint来检测。 $ npm install --save-dev gulp-scss-lint@0.3.6 gulp-jshint@1.8.5 jshint-stylish@2.0.1 另外你需要安装 sass-lint 的Gem包并运行 ...
这是一个预提交脚本,用于检查添加,复制,修改或重命名的文件是否存在语法错误和PSR2编码标准。 安装 # Put the pre-commit file in the .git/hooks/ folder in your git repository. curl -O https://raw.githubusercontent.com/WouterSioen/pre-commit/master/pre-commit # create new hooks folder mkdir ....