Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.75 KB

no-textarea-mustache.md

File metadata and controls

58 lines (38 loc) · 1.75 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-textarea-mustache
disallow mustaches in `<textarea>`
v3.0.0

vue/no-textarea-mustache

disallow mustaches in <textarea>

  • ⚙️ This rule is included in all of "plugin:vue/essential", *.configs["flat/essential"], "plugin:vue/vue2-essential", *.configs["flat/vue2-essential"], "plugin:vue/strongly-recommended", *.configs["flat/strongly-recommended"], "plugin:vue/vue2-strongly-recommended", *.configs["flat/vue2-strongly-recommended"], "plugin:vue/recommended", *.configs["flat/recommended"], "plugin:vue/vue2-recommended" and *.configs["flat/vue2-recommended"].

📖 Rule Details

This rule reports mustaches in <textarea>.

<template>
  <!-- ✓ GOOD -->
  <textarea v-model="message" />

  <!-- ✗ BAD -->
  <textarea>{{ message }}</textarea>
</template>

::: warning Note Interpolation on textareas (<textarea>{{text}}</textarea>) won't work. Use v-model instead. https://vuejs.org/guide/essentials/forms.html#multiline-text :::

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-vue v3.0.0

🔍 Implementation