Skip to content

Instantly share code, notes, and snippets.

@robomatic
Last active June 27, 2025 14:04
Show Gist options
  • Select an option

  • Save robomatic/e6afbc8faf0208c94dee796a318e13d0 to your computer and use it in GitHub Desktop.

Select an option

Save robomatic/e6afbc8faf0208c94dee796a318e13d0 to your computer and use it in GitHub Desktop.
Vue Coding Standards - Copilot Instructions

Project coding standards

TypeScript Guidelines

  • Use TypeScript for all new code
  • Follow functional programming principles where possible
  • Prefer interfaces for data structures and type definitions
  • Prefer immutable data (const, readonly)
  • Use optional chaining (?.) and nullish coalescing (??) operators

Vue Guidelines

  • Use VUE composition API
  • Use setup and typescript <script setup lang="ts">
  • Order the script first then the template
  • Never use style block only tailwind classes for styling

App Specific Guidelines for Components Built for /apps/*

  • Prefer using components found in /packages/ui
  • When using imported components, Use template slots variants or options provided by the component

Naming Conventions

  • Use PascalCase for component names, interfaces, and type aliases
  • Use camelCase for variables, functions, and methods
  • Prefix private class members with underscore (_)
  • Use ALL_CAPS for constants
  • Use kebab case for filenames, vue component names and attributes/props to components when used in template blocks

Error Handling

  • Use try/catch blocks for async operations
  • Always log errors with contextual information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment