daleharvey/jshint-mode — pull request #28 by carljm (2014-03-19 01:37:44+00:00)
Title: Support globals

JSHint, used via command-line, allows "globals" to be specified in .jshintrc. But for some reason when used as a library globals are not accepted as a config option, they have to be passed in as a third argument to the function.

This change makes "globals" in .jshintrc work with jshint-mode the way they would with jshint used via command-line.

This builds on top of #27 (upgrade to jshint 2.4.4) because the current jshint (r12) throws a "Bad option: globals" warning with use of globals in .jshintrc. It would be possible to workaround that by deleting the globals key from config, but this is actually a bit tricky to do neatly with the cached config setup, and didn't seem worth it given that upgrading jshint is reasonable anyway.