The usual fix is to add negative glob patterns to your
gulp.src() call. Doesn't this feel verbose and tedious? There is a better way! You already have this list inside your
.gitignore file, let's just use it.
$ npm install --save-dev gulp-exclude-gitignore
var excludeGitignore = require('gulp-exclude-gitignore'); gulp.src('**/*.js') .pipe(excludeGitignore()) .pipe(jshint());
ISC © Simon Boudrias