forked from engaging-computing/MYR
-
Notifications
You must be signed in to change notification settings - Fork 0
Style Guide
davidjonesma edited this page May 18, 2022
·
1 revision
- Indenting should be done with 4 spaces.
- Every statement should end in a semicolon.
- Quotes should be double quotes ("").
- The use of var is not permitted. You must use let or const.
- Use const for constant variables.
- Use === or !==. Do not use == or !=.
- In a comma separated list, items should have a space between each item.
- Numbers with a decimal should start with a 0 (e.x. 0.8 not .8).
The MYR source code style guide is enforced through eslint. The set of rules can be found in .eslintrc.json.
Rules of note:
- Indenting should be done with 4 spaces.
- Every statement should end in a semicolon.
- Quotes should be double quotes ("").
- console.log() is not permitted.
- The use of var is not permitted. You must use let or const.
- Use const for constant variables.
- Use === or !==. Do not use == or !=.
The style guide extends 2 existing style guides. The rules for eslint:recommended can be found here. The rules for react:recommended can be found here. Some of these rules have been turned off as can be seen in .eslintrc.json.
MYR | MYR GitHub | ECG Website
Getting Started
General