Rule
0 installs · 0 said it worked
Cursor rules for writing clean TypeScript, React, and Vite code
A .mdc rules file that makes Cursor generate concise, functional TypeScript for Node.js, React, Vite, TanStack, and Tailwind projects while preserving existing code and comments.
People use this for
- cursor rules typescript react
- vite react typescript prompt
- clean typescript code generation
- react tailwind functional components
- cursor mdc rules react vite
- Name
cursor-rules-for-writing-clean-typescript-react-and-vite-code- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
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/cursor-rules-for-writing-clean-typescript-react-and-vite-code-2c2k/export/mdc" -o .cursor/rules/cursor-rules-for-writing-clean-typescript-react-and-vite-code.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save cursor-rules-for-writing-clean-typescript-react-and-vite-code.mdc as .cursor/rules/cursor-rules-for-writing-clean-typescript-react-and-vite-code.mdc for this project or ~/.cursor/rules/cursor-rules-for-writing-clean-typescript-react-and-vite-code.mdc for every project, then start a new session.
Rule
description: "Cursor rules for TypeScript development with Node.js, React, and Vite integration." globs: */ alwaysApply: false
You are an expert in TypeScript, Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind.
Response Constraints
- Do not remove any existing code unless necessary.
- Do not remove my comments or commented-out code unless necessary.
- Do not change the formatting of my imports.
- Do not change the formatting of my code unless important for new functionality.
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.
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 the "function" keyword for pure functions.
- Use curly braces for all conditionals. Favor simplicity over cleverness.
- Use declarative JSX.
UI and Styling
- Use Tailwind for components and styling.
Performance Optimization
- Look for ways to make things faster:
- Use immutable data structures
- Use efficient data fetching strategies
- Optimize network requests
- Use efficient data structures
- Use efficient algorithms
- Use efficient rendering strategies
- Use efficient state management
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.
Related rules
- Cursor rules enforcing clean, readable, maintainable code practices
A Cursor .mdc rule file that guides the assistant toward clean code: named constants, meaningful names, sparing comments, single-purpose functions, DRY, language style standards, extracted conditionals, continuous refactoring, and version control.
Coding · @patrickjs
- Convex backend coding rules for Cursor AI assistant
A Cursor rules file (.mdc) that guides the AI to write Convex backend code with current best practices: new function syntax, validators, function registration, references, pagination, schema, and query and action rules.
Coding · @patrickjs
- Scaffold a full production-ready project repository from a brief
A system-style prompt that makes the model act as an elite software engineer and product architect, filling a project brief to generate a complete, runnable repository with file tree, source files, setup commands, and an upgrade roadmap.
Coding · @handkllcservices
- Autonomous coding agent that builds a verified app-builder harness
Master system prompt that directs an autonomous senior Python engineer to build a spec-driven, evidence-traced app-builder harness milestone by milestone without asking questions.
Coding · @mahfuzahmedog
- Cursor rules for writing TypeScript Vite Vue and Tailwind code
A Cursor rules file that guides the assistant to write concise, functional TypeScript for Vite, Vue, Pinia, and Tailwind/DaisyUI projects with performance and naming conventions.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.