Skip to content

Latest commit

 

History

History
64 lines (36 loc) · 1.98 KB

codeStandard.md

File metadata and controls

64 lines (36 loc) · 1.98 KB

All of these code standards should be applied at all times.

table

  1. Naming
  1. Commenting and Documentation
  1. Code Structure and Organization
  1. Avoiding Magic Numbers and Strings
  2. Code Reusability

Naming

Functions and classes

Use PascalCase

Variables

Use camelCase

Commenting and Documentation

Comments

Use comments to explain the "why" and not the "what".

Documentation

Use JSDoc to document classes and functions if they return a value

Code Structure and Organization

Consistent Indentation

Use Indent using Tabs with a tab size of 4. if you do not have Prettier installer already, install it now. Installing Prettier ensures that the code remains consistent.

File and Directory Structure

Place your code in "src" and images, svg and other files in "public".

Avoiding Magic Numbers and Strings

Code Reusability

Strive for DRY (Don't Repeat Yourself) principles by abstracting reusable code into classes, functions or variables.

Tools