Skip to content

JavaScript TypeScript Coding Standard

Darren Siegel edited this page Mar 7, 2017 · 3 revisions

Rationale

To facilitate maintainability by a community of developers, all source code authored under the umbrella of the Simon Initiative should conform to a stated standard.

JavaScript code

Pure JavaScript code should conform to the AirBnb JavaScript coding stanard.

Highlights of this coding standard include:

  • Use soft tabs (space character) set to 2 spaces
  • ' characters for string literals instead of " characters
  • { opening brace on same line as beginning of statement
  • camelCase when naming objects, functions, and instances
  • Use PascalCase only when naming constructors or classes.

TypeScript code

TypeScript code should also conform to the AirBnb JavaScript coding standard, as well as adhere to the following conventions:

  • None yet

React code

React code should also conform to the AirBnb React coding standard

Clone this wiki locally