CursorVueCode Style
Vue 3 (Composition API) Rules
const vue3CompositionApiBestPractices = [
.cursorrules
// Vue 3 Composition API .cursorrules // Vue 3 Composition API best practices const vue3CompositionApiBestPractices = [ "Use setup() function for component logic", "Utilize ref and reactive for reactive state", "Implement computed properties with computed()", "Use watch and watchEffect for side effects", "Implement lifecycle hooks with onMounted, onUpdated, etc.", "Utilize provide/inject for dependency injection", ]; // Folder structure const folderStructure = ` src/ components/ composables/ views/ router/ store/ assets/ App.vue main.js `; // Additional instructions const additionalInstructions = ` 1. Use TypeScript for type safety 2. Implement proper props and emits definitions 3. Utilize Vue 3's Teleport component when needed 4. Use Suspense for async components 5. Implement proper error handling 6. Follow Vue 3 style guide and naming conventions 7. Use Vite for fast development and building `;
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.
#cursor#vue#ai-coding-rules
Related Rules
Python Cursor Rules
CursorPython
Best Cursor AI coding rules for Python development. Enforce type hints, PEP 8, Pythonic patterns, and modern Python best practices in your .cursorrules file.
Code Style
python · type-hintsCopy Ready
TypeScript Cursor Rules
CursorTypeScript
Cursor rules for TypeScript: enforce strict mode, eliminate any types, and write type-safe code with these .cursorrules configurations.
Code Style
typescript · strictCopy Ready
React Cursor Rules
CursorReact
Cursor rules for React: component patterns, hooks best practices, performance optimization, and clean state management conventions.
Architecture
react · hooksCopy Ready
Next.js Cursor Rules
CursorNext.js
Cursor rules for Next.js App Router: server components, data fetching, routing, and deployment best practices.
Architecture
nextjs · app-routerCopy Ready