Closed nacin closed 8 years ago
Thanks for the report! I think /* globals */
is actually preferable because it is consistent with the configuration option of the same name (this is despite the fact that, as you note, the JSHint source code uses /* global */
). I've pushed a commit to use "globals" label consistently; here's the commit message:
Although JSHint happens to recognize the sequence
global
as the beginning of a comment-based directive, the sequenceglobals
is more consistent with JSHint's configuration options (which expose an option of the same name).Remove references to the
global
sequence to prevent confusion and promote consistency.
Does this address you concern?
In the absence of a response, I'm going to consider this resolved. Thanks again!
The "Inline configuration" section on the docs page suggests there are two primary inline directives:
/*jshint*/
and/*global*/
. However, the page proceeds to document/*globals*/
rather than/*global*/
. While JSHint supports both,/*global*/
clearly seems preferred, given that it's what is used in JSHint's own JS files. (It's also the only supported option by JSHint.)Should the docs be corrected? Expanded to note the alternative form?