.cursorrules for a strict TypeScript + React codebase
A tuned .cursorrules file that keeps Cursor's agent on-convention: strict types, no dead code, match existing patterns.
Generate a `.cursorrules` file for a TypeScript + React + [framework] project. The rules should make the AI: - Match existing file structure, naming, and import style before writing anything new; read neighboring files first. - Never use `any`; prefer precise types and discriminated unions. No non-null `!` unless justified in a comment. - Keep components small; extract logic into hooks/utils. No inline business logic in JSX. - Never add dependencies without asking. Prefer the standard library and existing utils. - No comments that restate code; only explain non-obvious 'why'. - Accessibility: semantic elements, labels for icon buttons, visible focus. - When unsure, ask a single clarifying question instead of guessing. Output only the `.cursorrules` file contents.
- Source
- promptfork seed
- License
- CC-BY-4.0
- Published
- 6/23/2026