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