gulp.task('lint', () => {
return gulp.src(['**/*.js'])
.pipe(eslint({
rules: {'rule1': 1,'rule2': 2},
envs: [{ "es6": false }]
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
In some cases, Except ES6 code, I am not interested to know any other errors. Only I wanted to find ES6 code in my directory and clear them out.