-
Notifications
You must be signed in to change notification settings - Fork 21
Code Conventions
ESlint, along with prettier is installed in this project to enforce the formatting conventions. Installing the prettier and ESLint extensions in your IDE is highly recommended
- We use PascalCase in naming components and other files eg. MyComponent
- We use camelCase in naming instances eg. const myComponent
- Use descriptive names to ensure easily readable and understandable code without comments as much as possible.
- We primarily use module.scss files for styling.
- Use single line comments for inline commenting or for explaining a single line of code (leave a space after the //)
- Use multi line comments for comments above function declarations and above components, at the top of the file or for having explanations longer than one line. Components must be commented above to describe how it can be used.
The Project follows the Default IDE code styling scheme of IntelliJ IDEA. More information on this can be found here. The project follows the Java code conventions created by Oracle; more detailed information is found here. Below is information pertaining to the most common conventions and choices made regarding code styling.
The naming conventions were the same as the Front End naming conventions described above.
Indentation and spacing are as per the default IDE settings.
-
Braces:
- Opening braces placed on the same line as the function and loop declaration.
-
Semicolons:
- Semicolon should be placed at the end of a line of code.
The width constraints are system dependent and there should be a hardwrap at 120 characters. This is per the default IDE settings.
Comments were only used when it was important for the code so that obvious comments were avoided.
- If a comment required more then one line then multiline comment syntax should be followed e.g.
/* Comment for code here */
There was no limit on Packages that can be imported contributers' judgement was advised.
Package Names
Package names should be in lowercase
File Hierarchy
Files were ordered in alphabetical order as per the default IDE setting.
General Information
Project Details
Implementation Details