Best .cursorrules for nuxt
Nuxt 3 full-stack development with Vue and Nitro
Why Use .cursorrules for nuxt?
Adding custom .cursorrules to your nuxt project dramatically improves Cursor AI code completions, inline generation, and refactoring accuracy. Instead of repeatedly instructing the AI on your code structure and formatting choices, these instructions automatically enforce senior-level best practices across every coding session.
- Enforces consistent file structure and component architecture for nuxt.
- Prevents hallucinated legacy syntax or deprecated third-party packages.
- Optimizes token usage by giving Cursor targeted, modular guidelines.
.cursorrules File Content
Copy this into your project's .cursorrules file to optimize Cursor AI for nuxt development.
You are an expert Nuxt 3 developer. Use auto-import conventions. Use server routes for API endpoints. Use useAsyncData for data fetching. Implement proper middleware. Use NuxtLink for navigation. Use composables for shared logic. Use modules for extended functionality. Implement proper SEO with useHead. Use Nitro for server engine. Leverage hybrid rendering modes.
How to Setup in Cursor AI
- Create a file named
.cursorrulesin the root directory of your nuxt repository. - Paste the contents above into the
.cursorrulesfile. - Save the file. Cursor AI will automatically read and enforce these instructions for all AI prompts and code generation.