Checklists

Vue (general) implementation checklist

This checklist provides a technical framework for validating Vue 3 applications before production deployment, focusing on performance, type safety, and state management integrity.

Progress0 / 25 complete (0%)

Performance and Build Optimization

0/5
  • Route-based Code Splitting

    critical

    Verify all non-initial routes in the Vue Router configuration use dynamic imports to reduce the main bundle size.

  • Tree-shaking Verification

    recommended

    Run a production build and use a bundle visualizer to ensure that unused components and heavy libraries are not included in the final assets.

  • Async Component Implementation

    recommended

    Wrap heavy third-party components (e.g., charts, editors) in 'defineAsyncComponent' to defer loading until they are rendered.

  • Image and Asset Optimization

    recommended

    Configure Vite plugins to compress static assets and ensure responsive image sets are used for high-resolution displays.

  • Prefetching Strategy

    optional

    Implement link prefetching for high-probability navigation paths using the browser's idle time.

TypeScript and Type Safety

0/5
  • Build-time Type Checking

    critical

    Integrate 'vue-tsc --noEmit' into the CI/CD pipeline to catch template-level type errors that 'tsc' ignores.

  • Prop and Emit Typing

    critical

    Ensure all components use generic 'defineProps' and 'defineEmits' interfaces rather than runtime-only declarations.

  • Template Ref Typing

    recommended

    Verify all DOM and component refs are strictly typed (e.g., ref<HTMLButtonElement | null>(null)) to prevent runtime null pointers.

  • Strict Mode Configuration

    critical

    Enable 'strict: true' and 'noImplicitAny' in tsconfig.json to ensure full coverage across the codebase.

  • External Data Typing

    recommended

    Apply Zod or similar schema validation to API responses before casting them to TypeScript interfaces.

State Management with Pinia

0/5
  • Reactivity Preservation

    critical

    Audit all store usage to ensure 'storeToRefs' is used when destructuring state to avoid losing reactivity.

  • Action-based State Updates

    recommended

    Enforce a pattern where state is only modified through actions to ensure updates are traceable in DevTools.

  • Subscription Cleanup

    recommended

    Manually unsubscribe from store '$subscribe' or '$onAction' listeners in the 'onUnmounted' hook if they are created outside of setup.

  • State Reset Logic

    critical

    Implement and call a '$reset' method for all user-related stores during the logout flow to prevent data leakage.

  • Persisted State Validation

    recommended

    Verify that any state persisted to LocalStorage is versioned and cleared if the schema changes.

Error Handling and Resilience

0/5
  • Global Error Hook

    critical

    Configure 'app.config.errorHandler' to pipe runtime errors to a monitoring service like Sentry or LogRocket.

  • Component Error Boundaries

    recommended

    Wrap high-risk components (e.g., third-party widgets) in parent components using the 'onErrorCaptured' hook.

  • API Feedback Loops

    critical

    Ensure every network request has a corresponding loading state and a user-facing error message for 4xx/5xx responses.

  • Watcher Cleanup

    recommended

    Verify that manually created 'watch' or 'effect' calls have their stop handles invoked to prevent memory leaks.

  • Environment Variable Validation

    critical

    Confirm that only non-sensitive variables are prefixed with 'VITE_' and that secrets are never committed to the repository.

Testing and Quality Assurance

0/5
  • Composable Unit Testing

    recommended

    Verify that business logic extracted into composables has 100% test coverage using Vitest.

  • Component Mount Testing

    recommended

    Test critical UI components using Vue Test Utils to verify correct event emission and prop rendering.

  • E2E Critical Path Testing

    critical

    Execute Playwright or Cypress tests for the primary user flows (login, checkout, profile updates).

  • Accessibility (A11y) Audit

    recommended

    Run an automated accessibility scanner (e.g., axe-core) to check for missing ARIA labels and low contrast ratios.

  • Linting and Formatting

    critical

    Run 'eslint --ext .js,.vue' and 'prettier --check' to ensure code consistency and prevent common syntax anti-patterns.