I've run JSLint for the first time on a rather lengthy file, and I have a lot of errors like
expected exactly 1 space between "function" and "("
unexpected ' '
/*jslint white: false */
While it checks for different things than JSLint, the
fixjsstyle mode of the Google closure linter may do what you want.