no-textarea-mustache
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/eslint-plugin-vue-recommended
What it does
Section titled “What it does”Reports {{ }} inside a <textarea>. Only in .vue files.
Why it matters
Section titled “Why it matters”The text of a <textarea> is its default value, and Vue does not interpolate it, so the user sees {{ text }} written out.
To fix, bind the value with v-model.
Example
Section titled “Example”... <template v-if="a"><p>ok</p></template> <template #head><p>ok</p></template> <textarea>{{ text }}</textarea>... <component :is="view" />...Configuration
Section titled “Configuration”angular: lint: rules: no-textarea-mustache: warn # off, warn (default), errorhtml: lint: rules: no-textarea-mustache: warn # off, warn (default), errorsvelte: lint: rules: no-textarea-mustache: warn # off, warn (default), errorvue: lint: rules: no-textarea-mustache: warn # off, warn (default), errorEnabled by the presets: html/eslint-plugin-vue-recommended.
Suppress one line with sudsy-disable-next-line no-textarea-mustache 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-textarea-mustache |
full |