Skip to content

no-v-text

Reports an element with v-text.

v-text replaces the whole content of the element, while {{ }} can sit among other text, and most Vue code uses the mustache, so two forms mean the same.

To fix, write {{ }} in the element.

Reported
...
<template v-for="x in xs" :key="x"><li /></template>
...
<p v-text="t"> </p>
...
</div>
</template>
angular:
lint:
rules:
no-v-text: warn # off (default), warn, error
html:
lint:
rules:
no-v-text: warn # off (default), warn, error
svelte:
lint:
rules:
no-v-text: warn # off (default), warn, error
vue:
lint:
rules:
no-v-text: warn # off (default), warn, error

Suppress one line with sudsy-disable-next-line no-v-text in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
eslint-plugin-vue no-v-text full