code-quality
Installation
SKILL.md
Code Quality Guidelines
Don't write forgiving code
- Don't permit multiple input formats
- In TypeScript, this means avoiding Union Type (the
|in types)
- In TypeScript, this means avoiding Union Type (the
- Use preconditions
- Use schema libraries
- Assert that inputs match expected formats
- When expectations are violated, throw, don't log
- Don't add defensive try/catch blocks
- Usually we let exceptions propagate out
- Don't keep legacy code paths as fallbacks
- Remove old code instead of keeping it around for compatibility
Naming Conventions
- Don't use abbreviations or acronyms
- Choose
numberinstead ofnumandgreaterThaninstead ofgt
- Choose