d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
2.6 KiB
2.6 KiB
paths
| paths | |
|---|---|
|
Vue Coding Style
This file extends common/coding-style.md with Vue specific content.
SFC Structure
- Always
<script setup lang="ts">with the Composition API. No Options API in new code. - Block order inside a
.vuefile:<script setup>, then<template>, then<style scoped>. One component per file. - Naming: component files PascalCase (
AuctionCard.vue), composables camelCase prefixeduseXxx(useAuctionTimer). - Format with Prettier plus ESLint flat config using
eslint-plugin-vue(vue/vue3-recommended). Type-check withvue-tsc.
Reactivity Discipline
refis the primary state API. Mutate via.valuein script, auto-unwrapped only at template top level.- Nested
refinside arrays,Map, orSetstill needs.valueto read. - Reach for
reactiveonly for grouped object state. Never reassign a wholereactiveobject. - Never destructure a
reactiveobject or a Pinia store withouttoRefs/storeToRefs. Plain destructure silently drops reactivity.
Computed and Watchers
computedgetters must be pure: no side effects, no async, no DOM access.- 3.4+
computedonly triggers when the returned value changes. Return the prior object unchanged when equal to skip downstream updates. watchis lazy. Pass a getter for a reactive property (watch(() => x.value, ...)), not the bare reactive object.watchEffectis eager and stops tracking dependencies after its firstawait.
Lifecycle and DOM
- Register lifecycle hooks synchronously inside
setup(onMounted,onUnmounted). - Clean up timers, listeners, and subscriptions in
onUnmounted. - Read or measure the DOM only after
await nextTick().
Macros and Templates
- Macros:
defineProps/defineEmits(tuple formchange: [id: number]),defineModel(3.4+) forv-model,withDefaultsor 3.5+ reactive-props-destructure for defaults,defineExposefor the public ref API. - Put a
:keyon everyv-for, a stable unique primitive. Never the array index, never an object. - Never put
v-ifandv-foron the same element. Wrap with<template v-for>plus an innerv-if, or precompute a filtered list.
<script setup lang="ts">
const props = defineProps<{ id: number }>()
const emit = defineEmits<{ change: [id: number] }>()
const open = defineModel<boolean>('open', { default: false })
</script>
Reference
- ECC skills:
frontend-patterns,vite-patterns. - Docs: https://vuejs.org/api/sfc-script-setup.html · https://vuejs.org/guide/essentials/reactivity-fundamentals.html · https://eslint.vuejs.org/