Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.
Rule
# Explicit types and names
Prefer clear, explicit types and names so that code is easy to understand and maintain.
- **Types:** Use explicit types for function parameters and return values; avoid `any` and unnecessary type assertions. Place shared types in a dedicated types directory or module.
- **Names:** Use descriptive names for variables, functions, and props; avoid ambiguous abbreviations unless they are project-standard (e.g. `id`, `ctx`).
- **Documentation:** Document non-obvious parameters, return values, or invariants (e.g. units, valid ranges) in JSDoc or comments when the type system alone is not enough.