Skip to content

Style Guide

Jason Kiesling edited this page Aug 15, 2019 · 5 revisions

MYR API

  • 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.

MYR Source Code

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.

Clone this wiki locally