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('test:eslint', () => {
const code = eslint.execute('--ignore-path .gitignore .');
if (code) {
throw new gutil.PluginError('test:eslint', new Error('ESLint error'));
}
});
gulp.task('lint', done => {
eslint.execute('--ext .js,.jsx .');
done();
});
.pipe(then(function(files) {
if (files.length) {
var paths = getPaths(files);
var code = eslint.execute(paths.join(' '));
if (code) {
reject(new util.PluginError('lint', new Error('ESLint error')));
return;
}
}
resolve(files);
}));
});
.pipe(then(function(files) {
if (files.length) {
var paths = getPaths(files);
var code = eslint.execute(paths.join(' '));
if (code) {
done(new util.PluginError('lint', new Error('ESLint error')));
return;
}
}
done(null, files.length);
}));
}
gulp.task('lint', function gulpLint(done) {
eslint.execute('--ext .js,.jsx .');
return done();
});
.pipe(then(function(files) {
if (files.length) {
var paths = getPaths(files);
var code = eslint.execute(paths.join(' '));
if (code) {
done(new util.PluginError('lint', new Error('ESLint error')));
return;
}
}
done(null, files.length);
}));
}