node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »



Express middleware to render jslint or jshint error reports on applicaton page load. Useful for ensuring your application is error free.

When in use, as long as your project has jslint errors, your GET requests to non-static files will render jslint error pages.

Example report


npm install express-jslint-reporter


var lintReporter = require('express-jslint-reporter');
// In dev-mode, show jslint errors.
app.configure('development', function () {
    // Location of jslint xml report
    lintFile: './.jslint_errors.xml'

Real world use

Use in combination with grunt to see up-to-date js errors on every page request.

Configure grunt-contrib-jshint and grunt-contrib-watch to build a jslint report on file changes.

  jshint: {    
    options: {
      reporterOutput: ".jslint_errors.xml",
      force: true,
      reporter: "jslint"
     src: ['./**/*.js']
   watch: {
     options: {
       debounceDelay: 2000
     scripts: {
       files: ['./**/*.js'],
       tasks: ['jshint']