Note

This is a documentation for version 7.0.0-beta.2.
To check version 6.2.2 go here. To check previous releases go here.

# vue/return-in-emits-validator

enforce that a return statement is present in emits validator

  • ⚙️ This rule is included in all of "plugin:vue/vue3-essential", "plugin:vue/vue3-strongly-recommended" and "plugin:vue/vue3-recommended".

# 📖 Rule Details

This rule enforces that a return statement is present in emits validators.

<script> export default { emits: { /* ✓ GOOD */ foo (evt) { if (evt) { return true } else { return false } }, bar: function () { return true }, baz (evt) { if (evt) { return true } }, /* ✗ BAD */ qux: function () {}, quux (evt) { if (!evt) { return false } } } } </script>
Now loading...

# 🔧 Options

Nothing.

# 📚 Further Reading

# 🔍 Implementation