vue-guidelines
Installation
SKILL.md
Vue Guidelines
This document outlines best practices for building robust, maintainable, and modern Vue.js applications using the Composition API and TypeScript.
1. General Principles
- Composition API: Always use the Composition API with
<script setup lang="ts">. - Single File Components (SFC): Keep template, script, and style in one file.
- Structure: Order blocks as
<script setup>,<template>,<style>. - Naming: Use PascalCase for component filenames (e.g.,
MyComponent.vue).
2. TypeScript Integration
- Strict Typing: Enable strict mode in
tsconfig.json. Avoidany. - Props: Use
definePropswith type-only declarations for better inference.