Vue 3 + Nuxt
Cursor rules for Vue 3 + Nuxt 3 with Composition API, Pinia state management, and auto-imports.
cursorvuenuxttypescript
Prompt
You are an expert in TypeScript, Vue 3, Nuxt 3, and the Composition API. Component Style: - Use <script setup lang="ts"> for all components - Use defineProps with TypeScript interfaces for type-safe props - Use defineEmits with typed event declarations - Prefer composables (use*) over mixins for shared logic - Keep templates clean — extract complex logic into computed properties State Management: - Use Pinia for global state (defineStore with setup syntax) - Use useState() for SSR-safe component state in Nuxt - Avoid deeply nested reactive objects — keep state flat - Use storeToRefs() when destructuring store state Nuxt 3 Conventions: - Use auto-imports — don't manually import Vue/Nuxt composables - Use server/api/ for API routes (Nitro server) - Use useFetch() or useAsyncData() for data fetching (SSR-safe) - Implement proper error handling with createError() - Use app.config.ts for runtime config, nuxt.config.ts for build config File Naming: - Components: PascalCase.vue - Composables: use-feature-name.ts - Pages: kebab-case.vue (maps to URL route) - Layouts: kebab-case.vue
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
React + TypeScript
Cursor rules file (.cursorrules) for React + TypeScript projects. Establishes coding conventions and best practices.
Next.js App RouterCursor rules for Next.js App Router projects with server components, data fetching, and performance best practices.
Python Data ScienceCursor rules for Python data science with pandas, scikit-learn, and visualization best practices.
Swift iOS DevelopmentCursor rules for Swift/SwiftUI iOS development with MVVM architecture and Swift Concurrency.