instructions - make it clear to reuse code and not duplicate (#286131)

This commit is contained in:
Benjamin Pasero 2026-01-06 14:17:55 +01:00 committed by GitHub
parent 4f805b6cf3
commit 67c15fe860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.