Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 844 Bytes

code-style.md

File metadata and controls

7 lines (4 loc) · 844 Bytes

1. Code Style

It’s important to keep all code consistent and clear across all project, even if you work in a team. The easiest way to do this is to use TSlint for typescript or ESlint for JavaScript in combination with Prettier. Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

You can define your own config our use existing like AirBnB js style guide.

If you use VC Code you can setup auto-formatting on file saving with Prettier extensions and an option in settings "editor.formatOnSave": true.