From 67c15fe860d7c9e196f7781a7bab69031dbc2f2e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jan 2026 14:17:55 +0100 Subject: [PATCH] instructions - make it clear to reuse code and not duplicate (#286131) --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4dad865443c..af0becdc630 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -136,3 +136,4 @@ function f(x: number, y: string): void { } - Do not use `any` or `unknown` as the type for variables, parameters, or return values unless absolutely necessary. If they need type annotations, they should have proper types or interfaces defined. - When adding file watching, prefer correlated file watchers (via fileService.createWatcher) to shared ones. - When adding tooltips to UI elements, prefer the use of IHoverService service. +- Do not duplicate code. Always look for existing utility functions, helpers, or patterns in the codebase before implementing new functionality. Reuse and extend existing code whenever possible.