Raindrop/CodeStyle
< Raindrop
Jump to navigation
Jump to search
Code Style
Here are some style guidance for the Raindrop code.
JavaScript
All code should conform to the JSLint style. Big highlights:
- 4 spaces for indentation, using spaces, not tabs.
- One var call per function.
- Always use braces around blocks.
To validate your code, here are some options:
- Use the online website
- If using Komodo or Komodo Edit, there is JSLint add-on. Go to Tools, Add-Ons, then click the Get Add-ons button, and search for "jslint".
- Use the dvcs_jslint to hook up JSLint as a pre-commit step for Mercurial.
All documentation for the JavaScript should be done in JSDoc format.