Gulp Linting
(() => {
'use strict';
let gulp = require('gulp');
let nodemon = require('gulp-nodemon');
let jshint = require('gulp-jshint');
let scsslint = require('gulp-scss-lint');
gulp.task('lint', ['lint:jshint', 'lint:jscs', 'lint:scss']);
gulp.task('lint:jshint', () => {
return gulp.src([
'gulpfile.js',
'public/js/**/*.js',
'routes/**/*.js',
'assets/modules/**/*.js',
'db/models/**/*.js'
])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('lint:jscs', () => {
return gulp.src([
'gulpfile.js',
'public/js/**/*.js',
'routes/**/*.js',
'assets/modules/**/*.js',
'db/models/**/*.js'
])
.pipe(jscs())
.pipe(jscs.reporter());
});
gulp.task('lint:scss', () => {
return gulp.src('assets/frontend/stylesheets/**/*.scss')
.pipe(scsslint());
});
})();
Véase