Possible Duplicate:
HTML formatter/tidy/beautifier for JavaScript
I’m looking for a good automated javascript cleaner (as in locates and fixes errors), similar to the w3c validator’s cleaner function (that fixes the javascript errors).
Update: Thanks to a helpful responce I found my solution: Closure Linter.
If I understand you correctly, you might be interested in Google’s Closure Linter, which, like JSLint, validates your code and reports problems, but also provides the possibility to fix them: