Vue · VUE0039

Remove props no caller passes

Finds declared Vue props that no resolved caller in the project ever passes.
VUE0039vite-doctor/vuearchitectureinfoNo fix

Run this rule

pnpm vite-doctor . --framework vue --extends auto,vue/strict --rules vue/props/no-unpassed-props

Why it matters

A prop that no caller passes always renders with its default value or undefined, so its type, default, and the branches that read it are contract surface no caller exercises. Doctor reports it only when every usage of the component is visible: the component has resolved template callers, none spreads props into it with v-bind, no script module, re-export, dynamic import, or render function reaches it, no unresolved tag could render it, and it is not part of a package that declares entry points. Test files are outside the analyzed source, so a prop only tests pass is still reported.

Remove the prop from defineProps and use the value it always has inside the component, or pass it from the caller that needs it. Keep it when code Doctor cannot see renders the component, such as another package, a global registration, or a render function.

Example

Drop a prop no caller passes

Before

<!-- ActionButton.vue -->
<script setup lang="ts">
const { size = 'md' } = defineProps<{ label: string; size?: 'sm' | 'md' }>()
</script>

<!-- Every caller -->
<template>
  <ActionButton label="Save" />
</template>

After

<!-- ActionButton.vue -->
<script setup lang="ts">
defineProps<{ label: string }>()
</script>

<!-- Every caller -->
<template>
  <ActionButton label="Save" />
</template>
Copyright © 2026