gruntjs - grunt-contrib-jshint doesn't complain about console.log -
with following setting jshint doesn't complain console.log
statements while still reports debugger
statements:
jshint: { files: [ 'gruntfile.js', 'js/**/*.js', 'tests/*.js', ], options: { curly: true, immed: true, noarg: true, expr: true, quotmark: 'single', maxdepth: 3, browser: true, eqnull: true } },
as far can tell, jshint has never warned references console
. there no code in there handle such references.
console
treated identifier should defined , accessible whatever context referred (which correct, since is).
therefore, can jshint warn usage of console
getting warn undefined variables. set undef
option true
.
then, if want allow usage of console
, can add globals
directive or set devel
option true
(which implicitly adds globals
directive).
Comments
Post a Comment