From c3b4f03c357a2ddc9e65159307ebe313868da0ee Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sat, 14 Nov 2015 07:49:48 -0600 Subject: [PATCH] Add linting for common files --- tasks/gulp-eslint.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tasks/gulp-eslint.js b/tasks/gulp-eslint.js index 403dc517f3..42462ce75d 100644 --- a/tasks/gulp-eslint.js +++ b/tasks/gulp-eslint.js @@ -10,12 +10,28 @@ gulp.task('lint:server', () => { return gulp .src([ './website/src/**/api-v3/**/*.js', - './website/src/models/user.js', - './website/src/server.js' + // Comment these out in develop, uncomment them in api-v3 + // './website/src/models/user.js', + // './website/src/server.js' ]) .pipe(eslint()) .pipe(eslint.format()) .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']);