PyFlakes 用于 JavaScript?
有没有这样的 Javascript 独立包,比如 Python 的 PyFlakes?我看到有 JsLint,但看起来它依赖于一些外部的东西,比如 Rhino。
我更喜欢像 PyFlakes 这样基本且紧凑的东西,因为它向我展示了我所犯的 80% 的错误,并且只有 PyLint 等其他工具的 20%(甚至更少)的复杂性。
理想情况下,它还应该有一个插入 Emacs 的工作方法,但如果该工具本身很有前途,我可以自己弄清楚。
Is there any such standalone package for Javascript, like PyFlakes for Python? I see there is JsLint, but it looks like it depends on some external things like Rhino.
I prefer something basic&compact like PyFlakes, because it shows me 80% of bugs I make and has only 20% (or even less) of complexity of other tools like PyLint.
Ideally it should also have a working recipe for plugging into Emacs, but I can figure it out myself if the tool itself is promising.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想要独立版本的 JSLint,请查看我的 jslint4java 项目。它将 rhino 和 JSLint 嵌入到可执行 jar 文件中。
this gist 中还有一个将其与 emacs 一起使用的示例。
If you want a standalone version of JSLint, take a look at my jslint4java project. It embeds rhino and JSLint into an executable jar file.
The is also an example of using it with emacs in this gist.
在 JSLInt 中,JSLint 上有一个“假定 Rhino”选项,当设置为 true 时,假定存在 Rhino,因此它提供的全局属性已被定义。我相信默认情况下这是“错误的”。
但至于依赖关系,不,JSLint 不依赖于 Rhino。
我没有使用过 PyFlakes 或 PyLint,但是在扫描了一些文档之后,我想说 JSLint 正是您所追求的。
In JSLInt there is an 'Assume Rhino' option on JSLint which, when set to true assumes that Rhino is present and, therefore, that the global properties it provides have been defined. I believe that this is 'false' by default.
But as for a dependency, no, JSLint not dependent on Rhino.
I've not used PyFlakes or PyLint, but after scanning some of the docs, I would say that JSLint is exactly what you are after.