Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.43 KB

no-custom-modifiers-on-v-model.md

File metadata and controls

53 lines (35 loc) · 1.43 KB
pageClass sidebarDepth title description
rule-details
0
vue/no-custom-modifiers-on-v-model
disallow custom modifiers on v-model used on the component

vue/no-custom-modifiers-on-v-model

disallow custom modifiers on v-model used on the 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 the component do not have custom modifiers.

📖 Rule Details

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

  • The directive used on the component has custom modifiers. E.g. <MyComponent v-model.aaa="foo" />
<template>
  <!-- ✓ GOOD -->
  <MyComponent v-model="foo" />
  <MyComponent v-model.trim="foo" />
  <MyComponent v-model.lazy="foo" />
  <MyComponent v-model.number="foo" />


  <!-- ✗ BAD -->
  <MyComponent v-model.aaa="foo" />
  <MyComponent v-model.aaa.bbb="foo" />

</template>

🔧 Options

Nothing.

👫 Related Rules

🔍 Implementation