From d28324a517774c762ec80d1be93ae3f6a07e2b55 Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Fri, 10 Jun 2022 05:31:33 +0200 Subject: [PATCH] docs: update best practices (#15960) --- docs/development/best-practices.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/development/best-practices.md b/docs/development/best-practices.md index be42045a5d..5bfc410ee2 100644 --- a/docs/development/best-practices.md +++ b/docs/development/best-practices.md @@ -6,6 +6,7 @@ Follow these best practices when you're working on our code. ## General - Prefer full function declarations for readability and better stack traces, so avoid `const func = ():void => {}` +- Prefer `interface` over `type` for TypeScript type declarations - Avoid [Enums](https://github.com/renovatebot/renovate/issues/13743), use union or [immutable objects](https://github.com/renovatebot/renovate/blob/5043379847818ac1fa71ff69c098451975e95710/lib/modules/versioning/pep440/range.ts#L8-L20) instead - Always add unit tests for full code coverage - Only use `istanbul` comments for unreachable code coverage that is needed for `codecov` completion -- GitLab