PyFlakes for Javascript?
-
24-10-2019 - |
문제
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.
해결책
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.