Should not allow snippet with syntax error to be saved. JSHint (especially a syntax-only build) might be okay: http://jshint.com.