Vue · Attributes
Reports a template $emit of an event the component does not declare when it runs in a handler for the same native event, and that native event provably reaches the component's single native root element, where the parent's listener falls through.
vite-doctor/vueattrswarnSuggestion
Why it happens
Vue 3 treats a parent's v-on listener as a fallthrough attribute unless the child declares the event in defineEmits or emits. A listener such as @click then lands on the child's root element as a native listener too, so a click that also calls $emit('click', payload) runs the parent's handler twice: once with the payload and once with the native MouseEvent.
Fix
Declare the event in defineEmits (or the emits option), or emit an event with a name that is not a native DOM event.
Example
Declare the emitted click event
Before
<template>
<button type="button" @click="$emit('click', id)">Open</button>
</template>
After
<script setup lang="ts">
defineEmits(['click'])
</script>
<template>
<button type="button" @click="$emit('click', id)">Open</button>
</template>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework vue --extends auto,vue/strict --rules vue/attrs/require-explicit-emits