I'm using jshint and I'd like to use the node
option, but I'd also like to disallow console statements.
Is this possible? I've been reading the jshint options documentation without luck.
Things I've tried that have failed:
"node": true,
"globals": {
"console": false
}
Also:
"node": true,
"devel": false
I guess I could set "node": false
and then explicitly add everything to globals
, but that seems ugly.
First of all the syntax:
"globals": {
"console": false
}
Is to allow console as a read only variable, so not what you want.
What does appear to work is the following setting:
"predef": ["-console"]
I couldn't find this directly documented, but the docs (http://jshint.com/docs/) mention the predef
jshintrc option, and later talk about inline global blacklists (e.g. /* global -BLACKLIST */
) and tests show that combining the two does work.
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