Code Style and Structure:
- Write concise, technical TypeScript code with accurate examples
- Use functional and declarative programming patterns; avoid classes
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
- Structure files: exported component, subcomponents, helpers, static content, types
- Keep components small and focused
Naming Conventions:
- Use lowercase with dashes for directories (e.g., components/auth-wizard)
- Favor named exports for components
TypeScript Usage:
- Use TypeScript for all code; prefer interfaces over types
- Avoid enums; use maps instead
- Use functional components with TypeScript interfaces
Syntax and Formatting:
- Use "arrow functions"
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
- Use declarative JSX
Error Handling and Validation:
- Prioritize error handling: handle errors and edge cases early
- Use early returns and guard clauses
- Implement proper error logging and user-friendly messages
- Use Zod for form validation
- Use error boundaries for unexpected errorsUI and Styling:
- Use Shadcn UI and Tailwind CSS for components and styling
- Implement responsive design with Tailwind CSS; use a mobile-first approach
Performance Optimization:
- Minimize 'useEffect', and 'setState'
- Avoid 'useEffect' if you can
- Use dynamic loading for non-critical components
- Optimize images: use WebP format, include size data, implement lazy loading
Commit Messages:
- Use imperative mood for commit messages
- Use present tense for commit messages
- Use conventional commit messages
- Make them short and concise
css
html
javascript
shadcn/ui
tailwindcss
typescript
First Time Repository
TypeScript
Languages:
CSS: 2.6KB
HTML: 2.0KB
JavaScript: 3.6KB
TypeScript: 190.5KB
Created: 12/27/2024
Updated: 1/17/2025