P
P
Pavel Grigoriev2016-06-26 10:48:10
gulp.js
Pavel Grigoriev, 2016-06-26 10:48:10

How to setup gulp-eslint + gulp-notify?

Hello, tell me how to set up the gulp-notify gulp-eslint bundle, js task looks like this now:

gulp.task('js', function() {
    gulp.src(path.js.source)
    .pipe(include())
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(eslint.failAfterError())
    .on("error", notify.onError({
      title: "Gulp: ESLint",
      message: "Error: <%= error.message %>"
    }))
    .pipe(gulp.dest(path.js.destination));
});

everything works, but a message of the form goes into the notification,
"Error: Failed with 1 error"
and everything is detailed in the console:
[14:43:07] 
.../Projects/default-postcss/src/static/scripts/scripts.js
  2:7  error  Unexpected dangling '_' in '_x'  no-underscore-dangle

✖ 1 problem (1 error, 0 warnings)

[14:43:07] gulp-notify: [Gulp: ESLint] Error: Failed with 1 error

Tell me, how can I transfer to the notification not only the number of errors, but also in which file, line and what kind of error? Ie exactly everything that goes to the console? Thank you

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question