DuranHub planes-dashboard .cursorrules file for TypeScript

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)

Naming Conventions:
- Use PascalCase for Directory and File names
- Favor named exports for components
- Use PascalCase for component names
- Use camelCase for variable names

TypeScript Usage:
- Use TypeScript for all code; prefer types over interfaces
- Avoid enums; use maps instead
- Use functional components with TypeScript interfaces

Syntax and Formatting:
- Use the "function" keyword for pure 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
- Model expected errors as return values in Server Actions
- Use error boundaries for unexpected errors

UI and Styling:
- Use Shadcn UI, Radix, and Tailwind for components and styling
- Implement responsive design with Tailwind CSS; use a mobile-first approach

Performance Optimization:
- Minimize 'use client', 'useEffect', and 'setState'; favor Remix style
- Use dynamic loading for non-critical components

Key Conventions:
- Optimize Web Vitals (LCP, CLS, FID)

Follow Remix documentation and examples for best practices.
css
javascript
radix-ui
remix
shadcn/ui
tailwindcss
typescript

First Time Repository

This is a revamp of the planes frontend from the monorepo

TypeScript

Languages:

CSS: 1.5KB
JavaScript: 4.4KB
TypeScript: 290.6KB
Created: 3/5/2024
Updated: 9/10/2024

All Repositories (1)

This is a revamp of the planes frontend from the monorepo