Cursor 110 words
Frontend Project .cursorrules
Drop into .cursorrules at repo root — Cursor applies it to every request.
# Project Rules
- Stack: React 18 + TypeScript + Tailwind CSS + Vite
- All components are function components with explicit prop types; no default exports for components
- Tailwind first: no inline style attributes, no CSS files unless animating
- Co-locate tests as Component.test.tsx using Vitest + Testing Library
- Naming: PascalCase components, camelCase hooks (use* prefix), files match their export
- Prefer composition over prop-drilling; context only for truly global state
- Every user-facing string that will be translated goes through the t() helper
- Accessibility: interactive elements need visible focus states and aria-labels when icon-only
- Do not add new dependencies without stating what they replace