Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1.31 KB

no-v-model-argument.md

File metadata and controls

54 lines (34 loc) · 1.31 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-v-model-argument
disallow adding an argument to `v-model` used in custom component
v7.0.0

vue/no-v-model-argument

disallow adding an argument to v-model used in custom component

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

This rule checks whether v-model used on custom component do not have an argument.

📖 Rule Details

This rule reports v-model directives in the following cases:

  • The directive used on component has an argument. E.g. <MyComponent v-model:aaa="foo" />
<template>
  <!-- ✓ GOOD -->
  <MyComponent v-model="foo" />


  <!-- ✗ BAD -->
  <MyComponent v-model:aaa="foo" />
</template>

🔧 Options

Nothing.

👫 Related Rules

🚀 Version

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

🔍 Implementation