Jeanluca Scaljeri Jeanluca Scaljeri - 1 year ago 108
Javascript Question

grunt: how to generate jshint output as HTML

I'm trying to run jshint using grunt. This works, but now I would like the output to be HTML. Here is my grunt file

module.exports = function(grunt) {

// Project configuration.
jshint: {
all: ['Gruntfile.js', 'src/*.js']
, options: {
//reporter: 'jslint'
, reporterOutput: 'jshint.html'


Running this grunt taks, the output is in XML. Any suggestion how to turn this into something that outputs HTML ?

Thanks a lot

Answer Source

You would need to write a custom reporter. Check the jshint docs on writing custom reporters: Then you can specify the path to the reporter with:

options: {
  reporter: '/path/to/custom/html/reporter',
  reporterOutput: 'jshint.html'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download