Hello I have the following gulp task that lints the solution and fails after any error in the linting process, I would like it to fail with text and not just fall over in a heap, I am not sure how to implement this. Any help would be appreciated.
gulp.task('lint-solution', function(done){
log('Linting solution')
return gulp.src(['../CRMPortal/**/*.js','../Common/**/*.js','!../Common/scripts/**/*','!../node_modules/**','!../CRMPortal/dist/**','!../CRMPortal/gulpfile.js'])
.pipe($.eslint({configFile: ".eslintrc.json"}))
.pipe($.eslint.format(
reporter, function(results){
fs.writeFileSync(path.join(__dirname,'report.html'), results);
}
))
.pipe($.eslint.failAfterError()); <-- I want text I provide to be printed on error here should that be the case , not just the error
})
At the moment (obviously) all I get is :
Message:
Failed with 1 error