I'm looking for good JavaScript command-line parsers which are able to check the code syntax.
Compatible with *nix systems, ideally cross-platform libraries.
Here is the list of generic JavaScript parsers:
A small, fast, JavaScript-based JavaScript parser.
Install via: npm -g install acorn
.
A high performance, standard-compliant ECMAScript parser written in ECMAScript.
Install via: npm -g install esprima
.
TypeScript by Microsoft (GitHub)
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Traceur is a JavaScript.next-to-JavaScript-of-today compiler.
JavaScript parser written in OCaml. Produces SpiderMonkey AST.
A JavaScript parser used in Babel.
Source: JavaScript parsers speed comparison.
Here is the speed comparison (ops/sec or type of error) for each parser/input combination.
Related: How can I check JavaScript code for syntax errors ONLY from the command line?