Skip to content
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

Add vue/valid-define-emits rule #1561

Merged
merged 1 commit into from Jul 6, 2021
Merged

Add vue/valid-define-emits rule #1561

merged 1 commit into from Jul 6, 2021

Conversation

ota-meshi
Copy link
Member

This PR adds vue/valid-define-props rule.

vue/valid-define-emits rule reports defineEmits compiler macros in the following cases:

  • defineEmits are referencing locally declared variables.
  • defineEmits has both a literal type and an argument. e.g. defineEmits<(e: 'foo')=>void>(['bar'])
  • defineEmits has been called multiple times.
  • Custom events are defined in both defineEmits and export default {}.
  • Custom events are not defined in either defineEmits or export default {}.

Related to #1248

@ota-meshi ota-meshi merged commit 90cd61e into master Jul 6, 2021
@ota-meshi ota-meshi deleted the valid-define-emits branch July 6, 2021 10:47
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.

None yet

1 participant