gpt4 book ai didi

javascript - 如何让 JSLint 扫描整个文件?

转载 作者:行者123 更新时间:2023-12-03 08:12:52 27 4
gpt4 key购买 nike

我正在使用 JSLint 扫描一些 Javascript 代码以查找潜在错误。我正在使用带有 JSLint 插件的 Notepad++。问题是 - 它只是扫描,比如说 x%文件,然后停止。我也取消了第一个错误时停止选项,但我得到了相同的结果。仅扫描 rhe 文件的一部分后它仍然停止。有没有办法让 JSLint 扫描整个文件而不是文件的某个百分比?

编辑:

我设置了maxerr选项为 10000,但扫描仅在 41 个错误处停止并显示(1% 已扫描)

编辑2:

目前,我的 JSLint 选项如下所示:
/*jslint indent: 50, maxerr: 10000, passfail: false, safe: true, adsafe: true, debug: true, evil: false, continue: true, css: false, on: false, fragment: false, es5: true, bitwise: true, regexp: false, eqeq: true */

最佳答案

最大错误数选项默认为 50

Maximum number of errors maxerr The maximum number of warnings reported. (default is 50)



您可以在 jsLint website 上查看所有选项.

将它设置为几千,它应该没问题:)

更新

这似乎是 special case for having variables not at the top of the file .您可以尝试设置 undefvars为真。如果您不喜欢这样,您可以考虑 jsHint,它是 jsLint 的一个分支,旨在更易于配置。

关于javascript - 如何让 JSLint 扫描整个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15913199/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com