B
B
Bogdan2017-06-23 10:56:49
JavaScript
Bogdan, 2017-06-23 10:56:49

Gulp-eslint + watch?

Hello. How can I configure EsLint to check only the changed file, in the current configuration, when one file is changed, it checks all files and displays information about them in the console? Thank you.

import {src, dest, watch, parallel, series} from 'gulp';
import eslint from 'gulp-eslint';

export const bEsLint = () => src('src/js/**/*.js')
  .pipe(eslint())
  .pipe(eslint.format());

// Watch Task
export const devWatch = () => {
  watch('src/js/**/*.js', bEsLint);
};

export default devWatch;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Negwereth, 2017-06-23
@Negwereth

It's best to have a linter on the side of the code editor, let the gulp do the more important stuff.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question