Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Use JSHint to detect potential errors and structural problems as you code. There's also a .jshintrc file that enforces the style guide in your code — install it simply by placing it in your source code's directory or a parent directory.