0

As you know, trailing commas break IE.

Is there a tool that, given a directory, it can traverse all its subdirectories, and scan all *.js files....removing trailing commas from them?

ziesemer
  • 26,896
  • 8
  • 84
  • 93
TIMEX
  • 238,746
  • 336
  • 750
  • 1,061

1 Answers1

6

I'd use JSLint.

var x = {a: "", b: "", };

Results in:

Error:

Problem at line 1 character 22: Unexpected ','.

var x = {a: "", b: "", };

Unfortunately, this doesn't traverse directories and do the removal. However, this leads to these answers, which may be helpful:

Community
  • 1
  • 1
ziesemer
  • 26,896
  • 8
  • 84
  • 93