开发者

PyFlakes for Javascript?

开发者 https://www.devze.com 2023-02-06 20:27 出处:网络
Is there any such standalone package for Java开发者_运维知识库script, like PyFlakes for Python? I see there is JsLint, but it looks like it depends on some external things like Rhino.

Is there any such standalone package for Java开发者_运维知识库script, 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消