/gulp-jscs-custom

Gulp plugin for JSCS with custimizable reporters, including Jenkins-friendly Checkstyle

Primary LanguageJavaScriptMIT LicenseMIT

Gulp JSCS Custom Reporter

Information

Packagegulp-jscs-custom
Description Gulp plugin for JSCS with custimizable reporters, including Jenkins-friendly Checkstyle. You can output files too.
Node Version >= 0.4

Install

npm install gulp-jscs-custom --save-dev

Usage

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
        }));
});

Options

{
    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
}