List of JavaScript Static Analysers
Google Closure Compiler
https://developers.google.com/closure/compiler/
- Syntax checking, including things like trailing commas in arrays
- Type checking (i.g. in math operations)
- Checks the number of arguments passed in function calls
- Finds unused code (functions that are never called)
- Can use optional JSDoc type annotations
Tern
- Error-tolerant parser
- Type inference
- Knows what properties objects have and their types
- Knows what variables are defined in scope and their types
- Knows function signatures
- By extension, allows autocompletion and go-to-definition
ESLint
- Syntax checking, incl. trailing commas
- Checks for undefined variable assignments
- Detects variable shadowing
- Multitude of other best practices and style checks