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.
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.
Share Improve this question asked Feb 11, 2014 at 1:50 whitehawkwhitehawk 2,42529 silver badges33 bronze badges1 Answer
Reset to default 6The 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.