Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.14 KB

no-v-text-v-html-on-component.md

File metadata and controls

46 lines (32 loc) · 1.14 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-v-text-v-html-on-component
disallow v-text / v-html on component
v8.4.0

vue/no-v-text-v-html-on-component

disallow v-text / v-html on component

📖 Rule Details

This rule disallows the use of v-text / v-html on component.

If you use v-text / v-html on a component, it will overwrite the component's content and may break the component.

<template>
  <!-- ✓ GOOD -->
  <div v-text="content"></div>
  <div v-html="html"></div>
  <MyComponent>{{content}}</MyComponent>

  <!-- ✗ BAD -->
  <MyComponent v-text="content"></MyComponent>
  <MyComponent v-html="html"></MyComponent>
</template>

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-vue v8.4.0

🔍 Implementation