提交 6fe3e828 编写于 作者: T Tomas Vik

docs(coding-guidelines): adding basic coding-guidelines

上级 0dff73b0
......@@ -43,6 +43,8 @@ For general information how to develop and debug VS Code Extensions, please see
The following instructions will help you run the GitLab Workflow Extension locally.
Please review our [Coding guidelines](docs/coding-guidelines.md) before writing new code.
#### Step - 1 : Installation Prerequisites
We're assuming that you already have [Visual Studio Code](https://code.visualstudio.com/) installed along
......
# Coding guidelines
We rely on `eslint` and `prettier` for code style. These guidelines contain a few rules that `eslint` and `prettier` tools don't enforce.
## TypeScript
- Prefer `interface` over `type` declaration when describing structures[^1].
- If you plan to implement an interface using classes, use the `I` prefix (e.g. `Car` implements `IVehicle`)[^1].
- Use `type` to define aliases for existing types, classes or interfaces, or to derive a type from another type. (e.g. `type PartialConfig = Partial<Config>`).
[^1]: [Discussion on the MR that introduced TypeScript](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/108#note_423512996)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册