Add linting for common files

This commit is contained in:
Blade Barringer
2015-11-14 07:49:48 -06:00
parent 7ec9687774
commit c3b4f03c35

View File

@@ -10,12 +10,28 @@ gulp.task('lint:server', () => {
return gulp return gulp
.src([ .src([
'./website/src/**/api-v3/**/*.js', './website/src/**/api-v3/**/*.js',
'./website/src/models/user.js', // Comment these out in develop, uncomment them in api-v3
'./website/src/server.js' // './website/src/models/user.js',
// './website/src/server.js'
]) ])
.pipe(eslint()) .pipe(eslint())
.pipe(eslint.format()) .pipe(eslint.format())
.pipe(eslint.failAfterError()); .pipe(eslint.failAfterError());
}); });
gulp.task('lint', ['lint:server']); gulp.task('lint:common', () => {
return gulp
.src([
'./common/script/**/*.js',
// @TODO remove these negations as the files are converted over.
'!./common/script/index.js',
'!./common/script/content/index.js',
'!./common/script/src/**/*.js',
'!./common/script/public/**/*.js',
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('lint', ['lint:server', 'lint:common']);