Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Coding guidelines

Yury Delendik edited this page Feb 11, 2018 · 4 revisions

Coding guidelines

TBD

TypeScript

Coding guidelines for the TypeScript code will be loosely derived from the TypeScript's guidelines

Names / Identifiers

  • Use PascalCase for type names and enum values
    • in some cases enum values can be in ALL_CAPS
  • Use camelCase for function names and variables
  • Use whole words in names

Types

  • Annotate types for function arguments and result
  • Use of any is discouraged

Comments

  • Unless it is a JSDoc comment, use single line comment //
  • Don't comment used code, remove it

Style

  • Use 2 spaces per indentation
  • Use arrow functions over anonymous function expressions
  • Use double quotes for strings
Clone this wiki locally