Stylish reporter for gulp-jscs
npm install gulp-jscs-stylishStylish reporter for gulp-jscs, uses jshint-stylish to do the actual reporting:
Compared to the default output:
``sh`
$ npm i --save-dev gulp-jscs-stylish
`js
var jscs = require('gulp-jscs');
var noop = function () {};
var stylish = require('gulp-jscs-stylish');
gulp.task('default', function () {
gulp.src([ 'file.js' ])
.pipe(jscs()) // enforce style guide
.pipe(stylish()); // log style errors
});
`
`js
var jscs = require('gulp-jscs');
var jshint = require('gulp-jshint');
var noop = function () {};
var stylish = require('gulp-jscs-stylish');
gulp.task('default', function () {
gulp.src([ 'file.js' ])
.pipe(jshint()) // hint (optional)
.pipe(jscs()) // enforce style guide
.pipe(stylish.combineWithHintResults()) // combine with jshint results
.pipe(jshint.reporter('jshint-stylish')); // use any jshint reporter to log hint
// and style guide errors
});
``.pipe(jshint())` is optional. you may very well use the reporter without running jshint
using
MIT © Christoph Werner