← back to code snippets


gulp-jshint

Posted on August 3rd, 2015 by Graeme

Use jshint with gulp using gulp-jshint plugin

$ npm install --save-dev gulp-jshint
var gulp = require("gulp");
var jshint = require("gulp-jshint");

gulp.task("lint", function() {
    gulp.src("./src/*.js")
        .pipe(jshint())
        .pipe(jshint.reporter("default"));
});

Source: javascript playground