mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-30 23:04:59 +08:00
add .mdc file
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: Additional instructions for Vue 3 development, covering areas like error handling, styling and best practices.
|
||||
globs: src/**/*
|
||||
---
|
||||
- Utilize Vue 3's Teleport component when needed
|
||||
- Use Suspense for async components
|
||||
- Implement proper error handling
|
||||
- Follow Vue 3 style guide and naming conventions
|
||||
- Use Vite for fast development and building
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Specific rules for composables in the Vue 3 Composition API. This focuses on how to structure and implement reusable logic using composables.
|
||||
globs: src/composables/**/*.js
|
||||
---
|
||||
- Use setup() function for component logic
|
||||
- Utilize ref and reactive for reactive state
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description: General guidelines for Vue 3 components using the Composition API. This includes best practices and recommendations for component structure and reactive state management.
|
||||
globs: src/**/*.vue
|
||||
---
|
||||
- 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
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
---
|
||||
description: Defines the recommended folder structure for a Vue 3 project to maintain consistency and organization.
|
||||
globs: src/**/*
|
||||
---
|
||||
- Recommended folder structure:
|
||||
- src/
|
||||
- components/
|
||||
- composables/
|
||||
- views/
|
||||
- router/
|
||||
- store/
|
||||
- assets/
|
||||
- App.vue
|
||||
- main.js
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Enforces the use of TypeScript for type safety in Vue 3 projects, especially for .ts files.
|
||||
globs: src/**/*.ts
|
||||
---
|
||||
- Use TypeScript for type safety
|
||||
- Implement proper props and emits definitions
|
||||
Reference in New Issue
Block a user