mila-labs / jshint-checkstyle-file-reporter

JSHint checkstyle file reporter

Home Page:https://www.npmjs.org/package/jshint-checkstyle-file-reporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSHint checkstyle file reporter

Writes checkstyle output to a file. This can be used to report JSHint results to Jenkins.

Installation

npm install --save-dev jshint-checkstyle-file-reporter

Usage

Standard JSHint cli

# optional specify a different filename
export JSHINT_CHECKSTYLE_FILE="jshint.xml" # default: checkstyle.xml
# run jshint
jshint --reporter node_modules/jshint-checkstyle-file-reporter *.js

Gulp

var gulp = require('gulp');
var jshint = require('gulp-jshint');
var checkstyleFileReporter = require('jshint-checkstyle-file-reporter');

// optional specify a different filename:
process.env.JSHINT_CHECKSTYLE_FILE = 'jshint.xml'; // default: checkstyle.xml

gulp.task('jshint', function() {
	gulp.src('*.js')
		.pipe(jshint())
		.pipe(jshint.reporter(checkstyleFileReporter));
});

About

JSHint checkstyle file reporter

https://www.npmjs.org/package/jshint-checkstyle-file-reporter


Languages

Language:JavaScript 100.0%