Skip to content

repro: arrows function as emits validators fails #1137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cexbrayat
Copy link
Member

Using an arrow function as an emit validator fails:

error: Expected to return a boolean value in "selected" emits validator (vue/return-in-emits-validator) at src/chapters/tests/User.vue:17:19:
  15 |
  16 |   emits: {
> 17 |     selected: () => true
     |                   ^
  18 |   },

I was keen to fix it myself, but I don't know what is missing. So here is a simple repro.

@ota-meshi
Copy link
Member

I will fix this bug. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants