Is JSLint it as far as js validation tools go, or are there others?
-
2As far as I know, JSLint is it. If not the only, then likely the best. – Ryan Kinal Jul 08 '10 at 22:55
-
4Might be worth checking out - "Are there any Javascript static analysis tools?": http://stackoverflow.com/questions/534601/are-there-any-javascript-static-analysis-tools – Dr. Frankenstein Jul 08 '10 at 22:57
-
10JSLint is definitely angling towards a specific code style - it's less of a problem finder and more of a "Douglas Crockford wouldn't like it" tool. – Chris Moschini Jun 19 '12 at 17:37
7 Answers
-
I ran some of our code through JSHint, and it looks great. Thanks for pointing it out! – Chris Jaynes May 11 '11 at 18:09
-
1
A recent addition to the list: https://github.com/eslint/eslint
All the rules are implemented as plugins so it's easy to add your own

- 684
- 6
- 9
JSHint, JavaScript Lint (cites JSLint as main source for inspiration, and has similarities and even borrowed code, but is different), Esprima (calls JavaScript by a different name, but is the same thing, "ECMAscript"), and any that other answers listed that I didn't include in this list.
Also, I believe there are plug-ins for eclipse and other IDEs that can be used that are implementations of the mentioned validators, as well as Apache Ant tasks.
Some Useful links:
http://www.javascriptlint.com/index.htm
http://eclipsesource.com/blogs/2012/01/26/javascript-validation-with-jshint-eclipse/ (article on plug-in)
http://github.eclipsesource.com/jshint-eclipse/ (Installation link)
https://github.com/ariya/ant-javascript-validate (apache ant task)
Also, here is a more comprehensive tool going beyond just JavaScript validation, but doing additional things as well: https://code.google.com/p/wro4j/

- 884
- 13
- 27
JSHint, the Closure JavaScript compiler and PHP CodeSniffer are all robust, community-supported JavaScript validation tools. Each ships with its own set of rules, which you can modify to some extent (CodeSniffer is the most flexible in terms of customization). For JSLint users, JSHint may be the most interesting option as it was originally intended to be a less strict fork of JSLint.
See also my answer to the question "Are There Any JavaScript Static Analysis Tools?"

- 1
- 1

- 4,576
- 2
- 28
- 25
Full disclosure, I'm behind this: http://www.toptensoftware.com/minime which does minification, obfuscation and a reasonable set of lint style checks.

- 44,114
- 19
- 59
- 88
You can also use Closure Linter which is also available as a Grunt package

- 8,604
- 9
- 57
- 90