Vue · Style
vite-doctor/vuestylewarnSuggestion
Why it happens
Vue's reactive props destructure expresses defaults at the binding site and avoids a separate withDefaults() wrapper in supported Vue versions.
Fix
Use the Vue-supported props destructure defaults pattern instead.
Example
Use reactive props destructure defaults
Before
<script setup lang="ts">
withDefaults(defineProps<{ label?: string }>(), {
label: 'Save',
})
</script>
After
<script setup lang="ts">
const { label = 'Save' } = defineProps<{ label?: string }>()
</script>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework vue --rules vue/style/prefer-props-destructure-defaults