vue/require-default-prop
doesn't trigger with props destructure
#2725
Labels
vue/require-default-prop
doesn't trigger with props destructure
#2725
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
const { msg } = defineProps<{ msg?: string; }>();
What did you expect to happen?
I switched from using the
withDefaults
to the new props destructure syntax and I expected thevue/require-default-prop
to continue to check when defaults were not defined in the destructured object. I expected the above example to complain that I did not define defaults formsg
.What actually happened?
I got no errors in the above example.
Repository to reproduce this issue
https://github.com/hartbit/eslint-require-default-prop-destructured-issue
src/components/HelloWorld.vue
component generates a warning, as expected, as it useswithDefaults
,src/components/HelloWordIssue.vue
component does not generate a warningThe text was updated successfully, but these errors were encountered: