Earlier quoted context omitted.
alternatively, use JSLint
I much prefer JSHint. JSLint is draconian, and has some borderline insane decisions (it complains if you don't declare your vars at the top of a block—is this 1980?). And yes, I realise that some of these options can be turned off —but JSHint has better defaults.
{
"browser" : true,
"node" : true,
"undef" : true,
"eqeqeq" : true,
"noarg" : true
}