JS.VUE.NO.V.MODEL.ARGUMENT

Disallow adding an argument to 'v-model' used in custom component

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" />

{'vue/no-v-model-argument': ['error']}

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

Options

Nothing.

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/