Skip to content

Coding Style

JinGyeong Jeong edited this page Jun 28, 2018 · 1 revision

Table of contents

  1. TypeScript Styles
  2. Filenames
  3. Module export
  4. Tools
    1. VS Code Plugins
    2. TypeScript Formatter

TypeScript Styles

  • Refer to tsconfig.json and tslint.json

Filenames

  • Use snake_case for non-class component file (e.g. client/components/BlockDetails.tsx)
  • Use the class name for class component file (e.g. client/index.ts)

Tools

VS Code Plugins

  • EditorConfig for VS Code
  • TSLint

TypeScript Formatter

  1. install tsfmt

    yarn global add typescript-formatter tslint

  2. run tsfmt on the root directory

    tsfmt -r

Clone this wiki locally