const lesshint = require('gulp-lesshint');
gulp.task('lint', () => {
return gulp.src('./src/**/*.less')
.pipe(lesshint({
// Options
}))
.pipe(lesshint.reporter('reporter-name')) // Leave empty to use the default, "stylish"
.pipe(lesshint.failOnError()); // Use this to fail the task on lint errors
});
serii@serii-desktop /var/www/barbershop.loc $ gulp lint
[23:31:32] Using gulpfile /var/www/barbershop.loc/gulpfile.js
[23:31:32] Starting 'lint'...
[23:31:34] 'lint' errored after 1.25 s
[23:31:34] TypeError: reporter.report is not a function
at DestroyableTransform.through.obj [as _flush] (/var/www/barbershop.loc/node_modules/gulp-lesshint/index.js:84:18)
at DestroyableTransform.prefinish (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_transform.js:138:10)
at DestroyableTransform.emit (events.js:182:13)
at DestroyableTransform.EventEmitter.emit (domain.js:460:23)
at prefinish (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_writable.js:619:14)
at finishMaybe (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_writable.js:627:5)
at endWritable (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_writable.js:638:3)
at DestroyableTransform.Writable.end (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_writable.js:594:41)
at DestroyableTransform.onend (/var/www/barbershop.loc/node_modules/readable-stream/lib/_stream_readable.js:577:10)
at Object.onceWrapper (events.js:273:13)