Is there a command-line tool in Linux that can identify basic syntax errors and compile time errors in JavaScript files intended for web browsers?
Usually, I write my JavaScript code alongside server-side languages like Ruby or Perl. It would be beneficial if I could test my client-side JavaScript similar to how I test server-side code - via the command line within tools like emacs. I'm mainly looking to catch simple mistakes like typos or misplaced brackets before executing the code.
Currently, my method for testing/debugging JavaScript involves the repetitive cycle of checking the browser with Firebug, fixing errors in emacs, and refreshing the page. While this is necessary for more complex errors, it would be ideal to quickly address syntax issues on the command line without opening the browser.
I've explored node.js and other server-side platforms but they focus on executing server code, making it difficult to handle client-side elements. Additionally, an Emacs mode for a JavaScript REPL didn't meet my needs as it relied on external browsers rather than performing basic compile checks.