JSLint站点已更新,我无法再检查JS脚本.对我来说,这个警告并不重要,我不想通过数千行来解决这个问题,我想找到更多关键问题.
有人知道如何关闭此错误,或使用旧版JSLint?
UPDATE
例:
function doSomethingWithNodes(nodes){
this.doSomething();
for (var i = 0; i < nodes.length; ++i){
this.doSomethingElse(nodes[i]);
}
doSomething(); // want to find this problem
}
Run Code Online (Sandbox Code Playgroud)
jslint.com输出:
Error:
Problem at line 4 character 8: Move all 'var' declarations to the top of the function.
for (var i = 0; i < nodes.length; ++i){
Problem at line 4 character 8: Stopping, unable to continue. (44% scanned).
Run Code Online (Sandbox Code Playgroud)
问题:
在函数之上设置变量是新要求.我不能使用JSLINT来测试代码,因为它会停止扫描此错误的脚本.
我有很多代码,并且不希望将此警告威胁为严重错误.
更新8/22/2011:找到http://jshint.com,它看起来比http://jslint.com/好多了