You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When assigning default values to props via props destructuring, arrays do not need to be generated by a function, and probably the same with objects. The vue documentation on props destructuring includes an example: https://vuejs.org/api/sfc-script-setup.html#reactive-props-destructure
I expected example = [] not to trigger the vue/require-valid-default-prop rule error.
What actually happened?
/home/projects/stackblitz-starters-reg1dy/test.vue
8:19 error Type of the default value for 'example' prop must be a function vue/require-valid-default-prop
✖ 1 problem (1 error, 0 warnings)
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
When assigning default values to props via props destructuring, arrays do not need to be generated by a function, and probably the same with objects. The vue documentation on props destructuring includes an example: https://vuejs.org/api/sfc-script-setup.html#reactive-props-destructure
I expected
example = []
not to trigger thevue/require-valid-default-prop
rule error.What actually happened?
Repository to reproduce this issue
https://stackblitz.com/edit/stackblitz-starters-qm6de7?file=test.vue
The text was updated successfully, but these errors were encountered: