- Use American English.
- OK:
color - NOT:
colour
- OK:
- Use serial commas.
- Use camelCase for instances, functions and variables.
- Use PascalCase for constructors (like classes).
- Use an underscore in the front to signify private scope.
- this._privateMember
- this.publicMember
- Use the Allman style of indentation for code.
- That means every curly brace is on it's own line (with a few exceptions for one-liners).
- When referring to methods in comments, use parentheses.
- OK:
node.onStart() - NOT:
node.onStart
- OK:
- Use correct capitalization when referencing other projects.
- OK:
JavaScript,Node.js - NOT:
Javascript,NodeJS
- OK:
- Refer to the linter for more specific guidelines.
- Use a semi-colon for the end of every statement.
- Use ES6
classinstead ofprototype. - Use absolute paths for imports.
- Use default exports only for constructors or "global" instances.
- Put
export defaultat the end of the file (not by declaration) if used.
- Use tags to mark release versions of the app, such as
v1.0.0. - Prepend branch name with type separated by a forward slash.
- OK:
review/SP19A_Andrew - NOT:
reviewCodeAndrewSP19
- OK:
- Use
feature/when adding new features to app.- OK:
feature/burger - NOT:
burger-feature
- OK:
- Use
release/when prepping for a release.- OK:
release/build-1.0.0 - NOT:
1.0.0.build2
- OK:
- Use
hotfix/when fixing any immediate issues or bugs.- OK:
hotfix/ghost_comma - NOT:
ghost_comma_bug_fix
- OK: