JS.VUE.NO.TEXTAREA.MUSTACHE

Disallow mustaches in '<textarea>'

Rule Details

This rule reports mustaches in <textarea>.

{'vue/no-textarea-mustache': ['error']}

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

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

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

Options

Nothing.

Further Reading

  • Guide - Form Input Bindings / Multiline text (https://v3.vuejs.org/guide/forms.html#multiline-text)

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/