gulp-standard icon indicating copy to clipboard operation
gulp-standard copied to clipboard

Example of how to correct the problems pointed out

Open farnetani opened this issue 8 years ago • 1 comments

I would like to know how my code would look below so that besides showing the errors, I also corrected them

gulp.task('standard', ['scripts'], function () {
  return gulp.src(['./dist/app.js'])
    .pipe(standard())
    .pipe(standard.reporter('default', {
      breakOnError: true,
      quiet: true,
      showRuleNames: true,
      showFilePath: false
    }))
})

farnetani avatar Oct 29 '17 19:10 farnetani

Pass the fix option to gulp-standard:

gulp.task('standard', ['scripts'], function () {
  return gulp.src(['./dist/app.js'])
    .pipe(standard({ fix: true }))
    .pipe(standard.reporter('default', {
      breakOnError: true,
      quiet: true,
      showRuleNames: true,
      showFilePath: false
    }))
})

TheDancingCode avatar May 02 '18 07:05 TheDancingCode