facebook/arcanist — pull request #12 by antonkovalyov (2012-01-13 23:36:26+00:00)
Title: Adds ArcanistJSHintLinter to check JS files for errors and potential problems.

This patch adds ArcanistJSHintLinter class and three new .arcconfig options:

* lint.jshint.prefix - directory where JSHint binary resides
* lint.jshint.bin - JSHint binary name (if different from 'jshint')
* lint.jshint.config - a JSON file with JSHint project-wide options

By default, this linter assumes that JSHint is installed on user's system as an NPM package.

Test Plan:

(1) Run `npm install jshint -g` to install JSHint and add ArcanistJSHintLinter to your Lint Engine (I didn't see PEP8 or PyFlakes in the PhutilLintEngine so I decided to not to put JSHint in there). After that you can do `arc lint my.js`.

(2) Create a new file, config.json, and add `{ "white": true }` in it. Add `"lint.jshint.config": "/path/to/config.json"` to your .arcconfig and run `arc lint my.js`. After that, unless your name is Douglas Crockford, you'll see tons of JSHint warnings about minor PEP8-like things (spacing, etc.)