gulp-jscs-custom

Gulp plugin for JSCS with custimizable reporter, and with file outputs, i.e. Jenkins-friendly Checkstyle

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-jscs-custom
500.1.69 years ago9 years agoMinified + gzip package size for gulp-jscs-custom in KB

Readme

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

<tr>
    <th>Option</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default value</th>
</tr>
<tr>
    <td>esnext</td>
    <td>Boolean</td>
    <td>JSCS's option to parse esnext</td>
    <td>```javascript
false ```
<tr>
    <td>configPath</td>
    <td>String</td>
    <td>Path to JSCS Config</td>
    <td>```javascript
'.jscsrc' ```
</tr>
<tr>
    <td>reporter</td>
    <td>String</td>
    <td>
        Which reporter JSCS will use. Options include:<br>
JSCS Reporters: 'console'
    • 'inline'
    • 'junit'
    • 'text'
  • You can also set the file path to a custom reporter.
</td>
        <td>```javascript
'console' ```
</tr>
<tr>
    <td>filePath</td>
    <td>String</td>
    <td>Output file path. If set to `null` will print to stdout</td>
    <td>```javascript
null ```
</tr>
<tr>
    <td>failOnError</td>
    <td>Boolean</td>
    <td>If true, gulp task will break if JSCS finds any linting error</td>
    <td>```javascript
false ```
</tr>
<tr>
    <td>alwaysCreateReport</td>
    <td>Boolean</td>
    <td>Create the report even if no errors were found</td>
    <td>```javascript
false ```
</tr>