typescript-coding-standards
Installation
SKILL.md
Contains Hooks
This skill uses Claude hooks which can execute code automatically in response to events. Review carefully before installing.
TypeScript Coding Standards
Principles
Type Safety
- Enable strict mode in tsconfig.json
- Avoid 'any' type - use 'unknown' when type is truly uncertain
- Use const assertions for literal types (as const)
- Prefer type inference over explicit types when obvious
- Use discriminated unions for complex state modeling
Naming Conventions
- Use PascalCase for types, interfaces, and classes
- Use camelCase for variables, functions, and properties
- Use UPPER_SNAKE_CASE for constants
- Prefix interfaces with 'I' only when necessary to avoid conflicts
- Use descriptive names that reveal intent