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-props rule #1560

Merged
merged 2 commits into from Jul 6, 2021
Merged

Add vue/valid-define-props rule #1560

merged 2 commits into from Jul 6, 2021

Conversation

ota-meshi
Copy link
Member

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

vue/valid-define-props rule reports defineProps compiler macros in the following cases:

  • defineProps are referencing locally declared variables.
  • defineProps has both a literal type and an argument. e.g. defineProps<{/*props*/}>({/*props*/})
  • defineProps has been called multiple times.
  • Props are defined in both defineProps and export default {}.
  • Props are not defined in either defineProps or export default {}.

Related to #1248

@ota-meshi ota-meshi merged commit fbf0194 into master Jul 6, 2021
@ota-meshi ota-meshi deleted the valid-define-props branch July 6, 2021 10:32
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