Files
main/rules-mdc/vue3.mdc
T
sanjeed5 8fbf269085 Regenerate all MDC rules with fresh Exa data and December 2025 best practices
- Refreshed all 241 library rules with current best practices
- Updated Exa search results for all libraries with 2025 content
- Fixed --regenerate-all flag logic to properly process all libraries
- Removed duplicate astro entry in rules.json (merged tags)
- Added missing docker.mdc and vim.mdc files
- All rules now include modern patterns and anti-patterns
- Updated with framework-specific recommendations for 2025

Technical improvements:
- Fixed retry_failed_only logic in generate_mdc_files.py
- Improved progress tracking for regeneration scenarios
- Ensured proper handling of --refresh-exa flag
2025-12-17 22:40:28 +05:30

39 lines
1.3 KiB
Plaintext

---
description: Definitive guidelines for building maintainable, performant, and type-safe Vue 3 applications using modern best practices, Composition API, and TypeScript.
globs: **/*.{js,jsx,ts,tsx,vue}
---
# Vue 3 Best Practices
This guide outlines the essential rules for developing high-quality Vue 3 applications. Adhere to these standards to ensure consistency, readability, and long-term maintainability across our codebase.
## 1. Foundational Setup: Linting & Formatting
**Always use ESLint and Prettier.** This combination enforces consistent code style and catches common errors automatically, streamlining development and code reviews. Integrate them into your IDE for real-time feedback and format-on-save.
## 2. Code Organization & Naming
### 2.1. Single-File Components (SFCs)
Each component **must** reside in its own `.vue` file.
❌ BAD
```js
// app.component('TodoList', { /* ... */ })
// app.component('TodoItem', { /* ... */ })
```
✅ GOOD
```
components/
├── TodoList.vue
└── TodoItem.vue
```
### 2.2. SFC Filename Casing
Use **PascalCase** for all SFC filenames. This aligns with component referencing in templates and JS(X) and improves editor autocompletion.
❌ BAD
```
components/
├── my-component.vue
└── myComponent.vue
```