Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 810 Bytes

require-component-is.md

File metadata and controls

29 lines (19 loc) · 810 Bytes

require v-bind:is of <component> elements (vue/require-component-is)

  • ⚙️ This rule is included in all of "plugin:vue/essential", "plugin:vue/strongly-recommended" and "plugin:vue/recommended".

You can use the same mount point and dynamically switch between multiple components using the reserved <component> element and dynamically bind to its is attribute:

https://vuejs.org/v2/guide/components.html#Dynamic-Components

📖 Rule Details

This rule reports the <component> elements which do not have v-bind:is attributes.

👎 Examples of incorrect code for this rule:

<component/>
<component is="type"/>

👍 Examples of correct code for this rule:

<component :is="type"/>
<component v-bind:is="type"/>

🔧 Options

Nothing.