Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('lint', function () {
return gulp.src(files.src.concat(files.test))
.pipe(eslint({
// configFile: './.eslintrc',
useEslintrc: true
}))
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
function failOnError() {
return gulp.src(['./src/**/*.js'])
.pipe(eslint(lintOptions))
.pipe(eslint.format())
.pipe(eslint.failOnError().on('error', function(e) {
console.log('jslint error:', e);
process.exit(1);
}));
}
gulp.task('lint', function () {
gulp
.src(['./src/js/**/*.js', './src/js/**/*.jsx'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
gulp.task('lint', function() {
gulp.src(options.lintPaths)
.pipe(eslint())
.pipe(eslint.formatEach())
.pipe(eslint.failOnError());
});
function lintFiles(files) {
return gulp.src(files)
.pipe(gulpFilter(['*.js']))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError())
}