no-v-text
What it does
Section titled “What it does”Reports an element with v-text.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”... <template v-for="x in xs" :key="x"><li /></template>... <p v-text="t"> </p>... </div></template>Configuration
Section titled “Configuration”angular: lint: rules: no-v-text: warn # off (default), warn, errorhtml: lint: rules: no-v-text: warn # off (default), warn, errorsvelte: lint: rules: no-v-text: warn # off (default), warn, errorvue: lint: rules: no-v-text: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line no-v-text in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint-plugin-vue | no-v-text |
full |