Skip to content

Commit 1a87953

Browse files
committed
add gulp tasks to eslint
1 parent 7269978 commit 1a87953

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

gulp/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default {
1818
scripts: {
1919
src: 'app/js/**/*.js',
2020
dest: 'build/js',
21-
test: 'test/**/*.js'
21+
test: 'test/**/*.js',
22+
gulp: 'gulp/**/*.js'
2223
},
2324

2425
images: {

gulp/tasks/eslint.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,8 @@ import gulp from 'gulp';
55
import eslint from 'gulp-eslint';
66

77
gulp.task('eslint', () => {
8-
// Be sure to return the stream from the task;
9-
// Otherwise, the task may end before the stream has finished.
10-
return gulp.src([config.scripts.src, '!app/js/templates.js', config.scripts.test])
11-
// eslint() attaches the lint output to the "eslint" property
12-
// of the file object so it can be used by other modules.
8+
return gulp.src([config.scripts.src, '!app/js/templates.js', config.scripts.test, config.scripts.gulp])
139
.pipe(eslint())
14-
// eslint.format() outputs the lint results to the console.
15-
// Alternatively use eslint.formatEach() (see Docs).
1610
.pipe(eslint.format())
17-
// To have the process exit with an error code (1) on
18-
// lint error, return the stream and pipe to failAfterError last.
1911
.pipe(eslint.failAfterError());
2012
});

0 commit comments

Comments
 (0)