A JSCS reporter - writes report to an HTML file
npm install jscs-html-reporter
An HTML reporter for node-jscs, grunt-jscs and gulp-jscs.
npm install jscs-html-reporter --save-dev
#### When using with node-jscs
Set the path to jscs-html-reporter. Command line example:
jscs . --reporter node_modules/jscs-html-reporter/jscs-html-reporter.js
Report will be written to jscs-html-report.html in current working directory.
#### When using with grunt-jscs
Configure jscs in Gruntfile.js so that reporter points to jscs-html-reporter.js and reporterOutput points to some HTML file within the project.
``javascript`
jscs: {
src: [
'path/to/files/*.js',
'another/path/to/files/*/.js'
],
options: {
maxErrors: null,
reporter: require('jscs-html-reporter').path,
reporterOutput: '/path/to/jscs-html-report.html'
}
}`
#### When using with gulp-jscs
Pipe jscs files to the reporter and provide an optional output path within the project:javascript
var gulp = require('gulp');
var jscs = require('gulp-jscs');
var jscsGulpHtmlReporter = require('jscs-html-reporter').gulpReporter;
gulp.task('default', function () {
return gulp.src(['path/to/files/.js', 'another/path/to/files//.js'])
.pipe(jscs())
.pipe(jscsGulpHtmlReporter({reporterOutput: '/path/to/jscs-html-report.html'}))
});
`reporterOutput
Report will be written to if specified, otherwise to jscs-html-report.html` in current working directory.