Back to Rules
Vue.js

Vue.js TypeScript Best Practices Checklist: Code Structure, Performance & Optimization Guide

Claude Directory November 29, 2025
0 copies 3 downloads

Elevate your Vue.js projects with TypeScript using this actionable checklist for clean, performant code. Covering Composition API, Vite builds, Tailwind styling, and Web Vitals optimization for scalable apps.

Rule Content
Follow these essential guidelines to build high-quality Vue.js applications with TypeScript:

### Code Style and Organization
- Craft short, readable TypeScript code with practical examples for easy maintenance.
- Prioritize functional and declarative approaches; steer clear of class-based patterns.
- Promote reusability through loops, modularity, and DRY principles to eliminate repetition.
- Choose clear variable names incorporating helper verbs like `isActive` or `shouldFetch`.
- Structure files logically: limit each to specific exports like components, utilities, types, or assets.

### Naming Standards
- Adopt kebab-case for folders (e.g., `ui/modal-dialog`).
- Opt for named exports on functions for better tree-shaking and imports.

### TypeScript Implementation
- Apply TypeScript universally; select interfaces over type aliases for superior extensibility.
- Replace enums with object maps to improve safety and adaptability.
- Develop functional components backed by TypeScript interfaces.

### Syntax and Composition
- Declare pure functions with the `function` keyword for hoisting benefits and readability.
- Exclusively use Vue's Composition API in `<script setup>` format.

### UI Components and Design
- Integrate Headless UI, Element Plus, and Tailwind CSS for flexible, accessible UIs.
- Ensure mobile-first responsiveness via Tailwind utilities.

### Performance Enhancements
- Utilize VueUse composables to boost reactivity and efficiency.
- Enclose async components in `<Suspense>` with custom fallback interfaces.
- Apply dynamic imports for secondary components to reduce initial loads.
- Enhance images with WebP encoding, explicit dimensions, and native lazy loading.
- Configure Vite for intelligent code splitting and minimal bundle outputs.

### Core Metrics
- Monitor and improve Core Web Vitals (LCP, CLS, INP) using Lighthouse audits or WebPageTest.

Comments

More Rules

View all
AI/ML

GLM-4.7 Optimized Config & System Prompt Designer

Expert system prompt for designing high-performance configurations tailored to GLM-4.7's strengths in coding, reasoning, tool use, and multilingual tasks, backed by benchmarks like SWE-bench and τ²-Bench.

C
Community
AI/ML

GLM-4.7 Open-Source Coding Expert: Optimized System Prompt

Leverage GLM-4.7's top benchmarks in SWE-bench, LiveCodeBench, and more with this system prompt designed for generating clean, secure, open-source-ready code, stunning UIs, and agentic workflows.

C
Community
AI/ML

GLM-4.7 Optimized Coding Agent

This system prompt transforms an AI into GLM-4.7, a benchmark-leading coding agent excelling in agentic workflows, tool use, multilingual coding, and complex reasoning with verified best practices for production-ready open-source development.

C
Community
DevOps

Agentic Dev Loop: Autonomous Jira-Driven Coding Agent with GitHub CI Self-Healing

Ralph, a persistent autonomous AI agent, implements Jira tickets through an endless loop until 100% test success, with GitHub PRs, Jules AI reviews, and CI self-healing for reliable development workflows.

C
Claude Directory
AI/ML

Türk Hukuku Uzmanı AI Agent: Güvenilir Yasal Danışman System Prompt

Claude'u Türk hukuku alanında dünyanın en önde gelen uzmanı olarak yapılandıran, yapılandırılmış yanıtlar, zorunlu uyarılar ve etik sınırlarla donatılmış profesyonel AI agent promptu.

C
Community
Database

PostgreSQL Best Practices: Expert Subagent Guide

Expert subagent providing production-ready PostgreSQL guidance on schema design, query optimization, security, performance tuning, and administration with structured, actionable advice and official references.

C
Claude Directory