-
Notifications
You must be signed in to change notification settings - Fork 17
Coding Style
JinGyeong Jeong edited this page Jul 6, 2018
·
10 revisions
- Refer to
tsconfig.json
andtslint.json
- 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
)
Use PascalCase, except for SDK class
- Use UPPERCASE for constant variables
- Use camelCase for others (e.g. signEcdsa)
- Except JSON (e.g. getTransactionFromJSON)
- Use
export
only. Do not useexport default
- EditorConfig for VS Code
- TSLint
- install tsfmt
yarn global add typescript-formatter tslint
- run tsfmt on the root directory
tsfmt -r