jshint-smart

Responsive reporter for JSHint

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jshint-smart
111.0.08 years ago8 years agoMinified + gzip package size for jshint-smart in KB

Readme

jshint-smart
!NPM versionnpm-imagenpm-url !Build statustravis-imagetravis-url !Dependency Statusdavid-imagedavid-url
Responsive reporter for JSHint

Example

On Linux :
screenshot
On Windows :
screenshot
The column "Code" will be displayed only if you run JSHint with a flag --verbose.
The column "Evidence" will be displayed only if there is enough space.

Install

$ npm install --save-dev jshint-smart

Usage

grunt-contrib-jshint

grunt.initConfig({
    jshint: {
		options: {
			reporter: require("jshint-smart"),
			verbose: false, // if true : show warning code
		},
		target: ["file.js"]
	}
});

grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.registerTask("default", ["jshint"]);

gulp-jshint

gulp.task("jshint", function () {
	return gulp.src(["file.js"])
		.pipe(jshint())
		.pipe(jshint.reporter("jshint-smart", { verbose: false })) // if true  : show warning code
		.pipe(jshint.reporter("fail"));                            // optional : fail when a JSHint error happens
});

gulp.task("default", ["jshint"]);

jshint-brunch

exports.config = {
	files: { },
	plugins: {
		jshint: {
			pattern: /^app(\/|\\).*\.js$/,
			reporter: "jshint-smart"
		}
	}
};

JSHint CLI

jshint file.js --reporter=./node_modules/jshint-smart/lib/jshint-smart.js