Vue · VUE0014

Prefer defineModel for component v-model

Finds Vue style code that should use the supported define model pattern instead.
VUE0014vite-doctor/vuestylewarnSuggestion

Run this rule

pnpm vite-doctor . --framework vue --rules vue/style/prefer-define-model

Why it matters

defineModel() keeps a component's model prop, update event, modifiers, and type in one compiler-checked declaration.

Use the Vue-supported define model pattern instead.

Example

Use defineModel

Before

<script setup lang="ts">
defineProps<{ modelValue: string }>()
const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
</script>

After

<script setup lang="ts">
const modelValue = defineModel<string>()
</script>
Copyright © 2026