- Check for similar issues first!
- Provide as many details as possible
- Indent using 2 spaces
- Use double quotes for strings
- Exception:
'"'
- Write only one expression per line
- Bad:
foo(); bar();
- Write valid JavaScript, a code linter is recommended!
- Explain code that is not obvious (comment above)
- If you add new functions, add documentation (comment above)
- Wrap function arguments in
+
signs (e.g.the +type+ is used for…
)
- If you add new functions, add tests (test/test.js)
- If you fixed an issue, add a test that would catch this issue
- Run tests (
npm test
) - Make sure as much of your code as possible is covered by tests
- Double check that your pull request is awesome :)