Skip to content

vue/require-explicit-emits ​

Define emits with defineEmits() for better documentation and type checking

PropertyValue
CategoryCorrectness
Default Severitywarning
Confidencehigh
FixableNo
Engineeslint-template
Sincev1.0.0
Frameworksvue, nuxt

Why it matters ​

Define emits with defineEmits() for better documentation and type checking

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Declare every emitted event in defineEmits() (or the emits option) and use those names when emitting.


Rule source: vue/require-explicit-emits

Released under the MIT License.