jshint/jshint — pull request #1457 by huntc (2014-01-04 12:47:54+00:00)
Title: cli and jshint code separation

I've separated cli and jshint code into their own packages. The main intent of this is to isolate the JSHint code required for those embedding style scenarios where the cli is not required.

All but the npm tests pass, but I’m also unable to get the bin/build script to work - could be an environmental thing here. As for the npm test, I don't understand how that should work nor how my changes affect it.

As a side note, I'd love to understand further on why jshint.js has browserify concerns there i.e.:

// We need this module here because environments such as IE and Rhino
// don't necessarilly expose the 'console' API and browserify uses
// it to log things. It's a sad state of affair, really.
var console = require("console-browserify");

I'm unsure how, but couldn't the build script somehow set up the console by providing some dummy console package... My main driver here is that if the dependency on console-browserify was removed from jshint.js then the non-cli code i.e. the src/jshint folder I have would depend only on underscorejs and nothing else...