Vue.js Cursor Rules
Cursor rules for Vue 3: Composition API patterns, script setup, TypeScript integration, and Vue ecosystem best practices.
- Use <script setup> syntax for all new components; avoid Options API in new code - Use defineProps and defineEmits with TypeScript generics for type safety - Prefer useTemplateRef over $refs for typed template references - Use Pinia for global state; keep component-local state in composables - Extract reusable logic into composables prefixed with use (useUser, useCart) - Use v-memo for expensive list renders with stable keys - Avoid mutating props directly; emit events or use v-model pattern - Use defineModel() macro for two-way binding in Vue 3.4+
How to use with Cursor
Create a `.cursorrules` file in your project root and paste these rules. Cursor reads this automatically on every AI interaction.
Related Rules
Python Cursor Rules
Best Cursor AI coding rules for Python development. Enforce type hints, PEP 8, Pythonic patterns, and modern Python best practices in your .cursorrules file.
TypeScript Cursor Rules
Cursor rules for TypeScript: enforce strict mode, eliminate any types, and write type-safe code with these .cursorrules configurations.
React Cursor Rules
Cursor rules for React: component patterns, hooks best practices, performance optimization, and clean state management conventions.
Next.js Cursor Rules
Cursor rules for Next.js App Router: server components, data fetching, routing, and deployment best practices.