Skip to content

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.

2 participants