Reputation: 2425
I'm using gulp to build my JavaScript. I want to run jshint on my files before I concat them, but I'm having trouble setting options. Am I doing this right?
var res = gulp.src(buildutil.produceFileGlob("./src", clientproperties))
.pipe(exclude('**/test/**'))
.pipe(jshint({ sub: false }}))
.pipe(jshint.reporter(stylish))
.pipe(buildutil.jsmoduleConcat("myfile.js"))
.pipe(gulp.dest('./dist'))
.pipe(closureCompiler(closureOptions))
.pipe(header(buildutil.getBuildHeader()))
.pipe(gulp.dest('./dist'));
So all this works, and jshint is outputting its errors, but my sub:false flag does not seem to take effect.
Upvotes: 6
Views: 4467
Reputation: 39570
The sub
option is set to false
by default — you need to set it to true
to have any effect.
Otherwise, you are using it correctly.
Upvotes: 6