cgw-best-practices
Use before writing or changing TypeScript in safe-client-gateway PRODUCTION code (src/, excluding spec files) - the cross-cutting dos and don'ts that no domain guide owns and biome does not fully catch. Covers parse-don't-assert (no `as X` or `as unknown as X` on data whose shape the compiler cannot guarantee), no `any` and no @ts-ignore/@ts-expect-error, no non-null assertions, `import type` for type-only imports (with the Symbol-DI-token exception), ILoggingService instead of console.*, no silently swallowed errors in a catch block, `private readonly` injected dependencies, explicit return types on exported methods, and named constants over inline magic values. Triggers on any production TypeScript edit, plus "type error", "cast", "as unknown", "as any", "catch block", "console.log", "magic number". For casts inside a spec file load cgw-testing and cgw-remarks instead - the test-mock cast idiom is the one sanctioned exception and those two own it.
Informations de source
- Dépôt
- safe-global/safe-client-gateway
- Dernière activité de la source
- 7 août 2026 à 12:46
- Langue détectée de SKILL.md
- anglais
- Étoiles
- 50
- Forks
- 102
Options d'installation
Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.
Vérifiez les fichiers source
Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.