How to find ES6 code using gulp-eslint (error only es6 code -no other rules needed)

487 Views Asked by At
 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.

0

There are 0 best solutions below