mirror of
https://github.com/cole-maxwell1/dotfiles.git
synced 2026-10-28 00:42:49 -05:00
- add conventions for Bash, C#, Go, Python, and TypeScript - add frontend guidance for HTMX, PrimeVue, and Vue - document formatting, typing, testing, async, and framework-specific practices - reference official documentation for framework API details
1.0 KiB
1.0 KiB
name, description
| name | description |
|---|---|
| vue | Vue 3 (Composition API, script setup, Pinia, Vue Router) conventions. Use when editing .vue files. |
Vue 3 Conventions
Use Vue 3 with the Composition API exclusively.
Components
- Use
<script setup lang="ts">; avoid the Options API. - Type props with
defineProps<T>()and emits withdefineEmits<T>(). - Keep components focused and small; organize by feature directory.
State and routing
- Use Pinia setup stores (
defineStore('name', () => { ... })) for shared state. - Cancel superseded fetches with
AbortController; expose loading and error state from stores. - Use Vue Router with route guards for protected views.
Reactivity
- Prefer
ref/reactiveandcomputedover manual watchers. - Clean up side effects (timers, listeners, observers) in
onScopeDisposeoronUnmounted.
API detail
- For exact reactivity, built-in component, and compiler behavior, fetch the Vue LLM docs index on demand:
https://vuejs.org/llms.txt. Follow the relevant guide link for the specific API.