Skip to content

Coding Style

JinGyeong Jeong edited this page Jun 28, 2018 · 10 revisions

Table of contents

  1. TypeScript Styles
  2. Filenames
  3. [Module import/export)(#module-importexport)
  4. Tools

TypeScript Styles

  • Refer to tsconfig.json and tslint.json

Filename

  • Use snake_case for non-class component file (e.g. src/utils.ts)
  • Use the class name for class component file (e.g. src/primitives/Block.ts)

Module export

  • Use export only. Do not use export default

Tools

VS Code Plugins

  • EditorConfig for VS Code
  • TSLint

TypeScript Formatter

  • install tsfmt: yarn global add typescript-formatter tslint
  • run: tsfmt -r on the root directory
Clone this wiki locally