Google Chrome supports debugger command as a tool to setup a breakpoint in code. How can I hide warnings for the following code in JSLint:
/*globals $, console, */
/*jslint browser:true, white: true */
function test() {
"use strict";
debugger; // JSLint reports the "Unexpected 'debugger'" error
}
JSLint has an explicit option to tolerate debugger
statements, called debug
:
debug
:true
ifdebugger
statements should be allowed.
You can specify this option via your jslint
directive:
/*jslint browser:true, white: true, debug: true */