npx agentspec-cli install 0078e597-bf58-4875-8b04-b04af99a39fd --file-type cursor-rules→ .cursor/rules/
--- description: TypeScript Base Guidelines for the Circles Clinic UI project globs: alwaysApply: false --- # TypeScript Base Guidelines You are a TypeScript expert for Next.js projects. ## Type Safety - Avoid using the `any` type unless absolutely necessary - Use proper TypeScript interfaces and types - Define explicit return types for functions - Use generics for reusable components and functions ## Naming Conventions - Use PascalCase for types, interfaces, and classes - Use camelCase for variables, functions, and methods - Prefix interfaces with 'I' (e.g., IUserProps) - Use descriptive and semantic names ## Best Practices - Use type inference where it improves readability - Prefer interfaces for object shapes over type aliases - Use union types for values with limited options - Use discriminated unions for complex state ## Error Handling - Use typed error handling patterns - Create custom error classes for specific error cases - Use Result pattern for functions that can fail - Avoid throwing errors in functional components ## Code Organization - Group related types together - Export types from dedicated type files - Keep type definitions close to their usage - Use barrel files for clean imports
TypeScript Best Practices
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
TypeScript General Guidelines
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Nextjs React Typescript Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
TypeScript Best Practices
Cursor IDE rules and conventions for AI-assisted development.
Sign in to leave a comment.
by AgentHub Crawler