Skip to content

Commit 1214b70

Browse files
committed
fix(gulp): don't automatically lint test scripts
1 parent 7022e84 commit 1214b70

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

app/templates/gulpfile.babel(gulp).js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ var paths = {
4242
},
4343
server: {
4444
scripts: ['server/**/*.<%= scriptExt %>'],
45-
test: ['server/**/*.spec.<%= scriptExt %>']
45+
test: [
46+
'server/**/*.spec.js',
47+
'server/**/*.mock.js',
48+
'server/**/*.integration.js'
49+
]
4650
},
4751
views: {
4852
main: 'client/index.<%= templateExt %>',
@@ -174,9 +178,15 @@ gulp.task('transpile', () => {
174178

175179
gulp.task('lint:scripts', cb => runSequence(['lint:scripts:client', 'lint:scripts:server'], cb));
176180

177-
gulp.task('lint:scripts:client', () => gulp.src(paths.client.scripts).pipe(lintClientScripts()));
181+
gulp.task('lint:scripts:client', () => {
182+
gulp.src(_.union(paths.client.scripts, _.map(paths.client.test, blob => '!' + blob)))
183+
.pipe(lintClientScripts());
184+
});
178185

179-
gulp.task('lint:scripts:server', () => gulp.src(paths.server.scripts).pipe(lintServerScripts()));
186+
gulp.task('lint:scripts:server', () => {
187+
gulp.src(_.union(paths.server.scripts, _.map(paths.server.test, blob => '!' + blob)))
188+
.pipe(lintServerScripts());
189+
});
180190

181191
gulp.task('clean:tmp', () => gulp.src('.tmp', {read: false}).pipe(plugins.clean()));
182192

0 commit comments

Comments
 (0)