HomePhabricator

Adds ArcanistJSHintLinter to check JS files for errors and potential problems.
e5bda0520060Unpublished

Unpublished Commit · Learn More

No further details are available.

Description

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.)

Details

Provenance
antonkovalyovAuthored on
epriestleyCommitted on Jan 13 2012, 11:21 PM
Parents
rARCf271e1d8e885: Improve 'arc' behavior under git mutable history with ambiguous commit messages
Branches
Unknown
Tags
Unknown

Event Timeline