Coding Standards - CPSECapstone/Turtle GitHub Wiki
Coding Standards
The following is a list of the general coding standards for the CloudHaven project. Each developer is expected to follow these standards.
- TDD
- Always end with ;
- Inline curly brackets [if (x) { ]
- Soft Rule: ~80 line functions
- Descriptive variable names (except iterators)
- PascalCase for classes and files
- camelCase for functions/variables/fields
- CAPITALIZE for constant variables
- Tab is 4 spaces
- In styles tab in spaces
- No global variables
- Nest blocks should be indented properly
- Space after parentheses ()
- Avoid line going off the page
- All variables default private (not sure if relevant for js)
- Review all your code before making a PR
- You can not merge your own PR
Recommended Procedures
- Style checker suggestion: prettier
- Style linter suggestion: ESLint
- Style file format suggestion: react styled component