skills/smithery.ai/hoangnguyen0403-typescript-best-practices

hoangnguyen0403-typescript-best-practices

SKILL.md

TypeScript Best Practices

Priority: P1 (OPERATIONAL)

Implementation Guidelines

  • Naming: Classes/Types=PascalCase, vars/funcs=camelCase, consts=UPPER_SNAKE. Prefix I only if needed.
  • Functions: Arrows for callbacks; regular for exports. Always type public API returns.
  • Modules: Named exports only. Import order: external → internal → relative.
  • Async: Use async/await, not raw Promises. Promise.all() for parallel.
  • Classes: Explicit access modifiers. Favor composition. Use readonly.
  • Types: Use never for exhaustiveness, asserts for runtime checks.
  • Optional: Use ?:, not | undefined.
  • Imports: Use import type for tree-shaking.

Anti-Patterns

Installs
2
First Seen
Mar 3, 2026