Package | gulp-jscs-custom |
Description | Gulp plugin for JSCS with custimizable reporters, including Jenkins-friendly Checkstyle. You can output files too. |
Node Version | >= 0.4 |
npm install gulp-jscs-custom --save-dev
var gulp = require('gulp'),
jscs = require('gulp-jscs-custom');
gulp.task('checkstyle', function () {
return gulp.src('./**/*.js')
.pipe(jscs({
esnext: false,
configPath: '.jscsrc',
reporter: 'checkstyle',
filePath: './jscs.xml',
failOnError: false
}));
});
{
esnext: Boolean, // (true | false) Defaults to false
configPath: String, // Path to JSCS Config
// Defaults to '.jscsrc'
reporter: String, // Builtin reporter: 'checkstyle'
// JSCS reporters:
// 'console', 'inline', 'junit', 'text'
// You can also set the file path to a custom reporter
// Defaults to: 'console'
filePath: String, // Output file path. Null will print to stdout
// Defaults to null
failOnError: Boolean // If set to true, gulp task will break if jscs finds any lint
// Defaults to false
}