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
  • 27,712
  • 8
  • 86
  • 94
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

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
  • 27,712
  • 8
  • 86
  • 94