jshint/node-jshint — pull request #107 by halkeye (2012-04-29 08:58:19+00:00)
Title: Use cli module instead of argsparser

Bring jslint command inline with more standard gnu style command line parameters.

I found passing the arguments on the end of the file list very counter intuitive and had to re-read the documentation a few times to get it working.

This patch switches from using argsparser module to cli. The main advantage is that options can be provided in any order (ie. hint file1.js --reporter reporter/blah.js file2.js)

This is especially helpful for using find | xargs when wanting to generate a jslint xml file (I want to make it part of my jenkinsci build step)

find -name '*.js' -print0 | xargs -0 hint --jslint-reporter > lint.xml

cli uses process.exit to bail out of execution, so it messed with the unit tests a bit for the --help option, so I made it throw an exception, so the unit tests get a little messy.

I welcome feedback.