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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With