JSLint 站点已更新,我无法再检查 JS 脚本。对我来说,这个警告并不关键,我不想通过数千行来解决这个问题,我想找到更关键的问题。
有谁知道如何关闭这个错误,或者使用旧的 JSLint?
更新
例子:
function doSomethingWithNodes(nodes){
this.doSomething();
for (var i = 0; i < nodes.length; ++i){
this.doSomethingElse(nodes[i]);
}
doSomething(); // want to find this problem
}
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).
问题:
在函数之上拥有变量是新的要求。我不能使用 JSLINT 来测试代码,因为它会在出现此错误时停止扫描脚本。
我有很多代码,不想将此警告威胁为严重错误。
更新 8/22/2011:找到http://jslint.com,它看起来比http://jslint.com/好多了