One technique I employ is running my JavaScript code through a handler that automatically removes new lines, comments, tabs, and extra whitespace. If I forget to end my JS statements with a semicolon, it often results in an error message (unfortunately). However, debugging becomes quite challenging using this method, as pinpointing errors can be tricky (e.g., error on line 1 character 2654).
Another approach I take is utilizing Firebug + YSlow, where I occasionally run the built-in JSLint for validation.
Perhaps there exists a tool in Visual Studio specifically designed for checking JavaScript syntax that can be customized similarly to how it is done for (X)HTML and XML files.