{"filename":"typescript-react-cursorrules-prompt-file.mdc","content":"---\ndescription: \"Cursor rules for TypeScript development with React integration.\"\nglobs: **/*\nalwaysApply: false\n---\n// TypeScript React .cursorrules\n\n// Prefer functional components\n\nconst preferFunctionalComponents = true;\n\n// TypeScript React best practices\n\nconst typescriptReactBestPractices = [\n  \"Use React.FC for functional components with props\",\n  \"Utilize useState and useEffect hooks for state and side effects\",\n  \"Implement proper TypeScript interfaces for props and state\",\n  \"Use React.memo for performance optimization when needed\",\n  \"Implement custom hooks for reusable logic\",\n  \"Utilize TypeScript's strict mode\",\n];\n\n// Folder structure\n\nconst folderStructure = `\nsrc/\n  components/\n  hooks/\n  pages/\n  types/\n  utils/\n  App.tsx\n  index.tsx\n`;\n\n// Additional instructions\n\nconst additionalInstructions = `\n1. Use .tsx extension for files with JSX\n2. Implement strict TypeScript checks\n3. Utilize React.lazy and Suspense for code-splitting\n4. Use type inference where possible\n5. Implement error boundaries for robust error handling\n6. Follow React and TypeScript best practices and naming conventions\n7. Use ESLint with TypeScript and React plugins for code quality\n`;\n"}