daleharvey / jshint-mode

JSHint integrated into emacs
Other
93 stars 26 forks source link

Support globals #28

Closed carljm closed 1 year ago

carljm commented 10 years ago

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.