Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

TypeScript and React coding rules for Cursor

A .cursorrules file that guides Cursor to write TypeScript React code with functional components, hooks, strict typing, lazy loading, error boundaries, and ESLint conventions.

People use this for

  • cursor rules typescript react
  • typescript react cursorrules file
  • react functional components hooks prompt
  • strict typescript react coding rules
  • write typescript react code with lazy loading
Name
typescript-and-react-coding-rules-for-cursor
Works with
Cursor
License
CC0(as observed at the source)
Version
v1 · updated Nov 29, 2026
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Use this rule

$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/typescript-and-react-coding-rules-for-cursor-rz34/export/mdc" -o .cursor/rules/typescript-and-react-coding-rules-for-cursor.mdc

Then open a new session; Cursor picks it up from .cursor/rules/.

Download typescript-and-react-coding-rules-for-cursor.mdc
Manual install

Save typescript-and-react-coding-rules-for-cursor.mdc as .cursor/rules/typescript-and-react-coding-rules-for-cursor.mdc for this project or ~/.cursor/rules/typescript-and-react-coding-rules-for-cursor.mdc for every project, then start a new session.

Rule


description: "Cursor rules for TypeScript development with React integration." globs: */ alwaysApply: false

// TypeScript React .cursorrules

// Prefer functional components

const preferFunctionalComponents = true;

// TypeScript React best practices

const typescriptReactBestPractices = [ "Use React.FC for functional components with props", "Utilize useState and useEffect hooks for state and side effects", "Implement proper TypeScript interfaces for props and state", "Use React.memo for performance optimization when needed", "Implement custom hooks for reusable logic", "Utilize TypeScript's strict mode", ];

// Folder structure

const folderStructure = src/ components/ hooks/ pages/ types/ utils/ App.tsx index.tsx;

// Additional instructions

const additionalInstructions = `

  1. Use .tsx extension for files with JSX
  2. Implement strict TypeScript checks
  3. Utilize React.lazy and Suspense for code-splitting
  4. Use type inference where possible
  5. Implement error boundaries for robust error handling
  6. Follow React and TypeScript best practices and naming conventions
  7. Use ESLint with TypeScript and React plugins for code quality `;

No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.

Tried it

Reports from people who added this rule to their editor. They roll up into the badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.