Skip to content

vue/require-emit-validator ​

require type definitions in emits

  • 💡 Some problems reported by this rule are manually fixable by editor suggestions.

📖 Rule Details ​

This rule enforces that an emits statement contains a type definition.

Declaring emits with types makes the code easier to maintain. Even when using TypeScript, this can provide better type inference when annotating parameters with types.

Now loading...

🔧 Options ​

Nothing.

📚 Further Reading ​

🚀 Version ​

This rule was introduced in eslint-plugin-vue v7.10.0

🔍 Implementation ​