There's some convention for writing about globals in JS that looks something like /* globals: foo, _ */ placed at the beginning of the file, but I can't remember it for the life of me. It's a miserable thing to search for, too.
The one other thing I can remember about it is that it was useful for silencing related linter errors.
The correct way to tell JSLint about globals is to use the globals directive. For example:
/*globals globalFunction, anotherGlobal, oneMore */
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With