-
Notifications
You must be signed in to change notification settings - Fork 23
Style Guide
Jason Kiesling edited this page Jun 19, 2019
·
5 revisions
- 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 !=.
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.