Is there any tool that can parse my JavaScript files to see if they contain syntax errors that will bother Javascript Internet Explorer mechanism, especially redundant trailing commas?
Example:
var some_object = { valid : "property", one : "comma too much ---> ", };
This code works fine in FireFox, Chrome, and Node.JS , but it crashes in IE due to trailing comma. The integrated IE debugger rarely helps, because it does not generate useful errors / warnings for large web applications like ours (many JavaScript files are combined together, adding up to 50-100 k lines of code).
JSLint does not help , as it reports a large number of other warnings or stops with some meaningless error.
One idea can use eval() directly in IE and catch SyntaxError exceptions, but I cannot do it in an automatic way (i.e. on the command line).
Unfortunately, Node.JS does not bother with commas.
No Linux / Windows tool that can do basic JavaScript syntax checking for a file?
Udo g source share