Vue · VUE0023
Prefer same-name prop shorthand
Prefer Vue 3.4 same-name v-bind shorthand when a prop and its bound variable have the same logical name.
vue/template/prefer-same-name-prop-shorthandsrc/rule-packs/vue/rules/vue/prefer-same-name-prop-shorthand.ts Upstream docs Run this rule
pnpm vite-doctor . --framework vue --rules vue/template/prefer-same-name-prop-shorthand
Why it matters
Repeating the same prop name and variable name in templates adds noise without adding meaning.
Recommended fix
Use
Useful links
Example
Use same-name prop shorthand
Before
<template>
<MyCmp :my-prop="myProp" />
</template>
After
<template>
<MyCmp :my-prop />
</template>
Keep explicit bindings when names differ
Before
<template>
<MyCmp :my-prop="myProp" />
</template>
After
<template>
<MyCmp :my-prop="selectedValue" />
</template>