Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.27 KB

use-v-on-exact.md

File metadata and controls

51 lines (36 loc) · 1.27 KB
pageClass sidebarDepth title description
rule-details
0
vue/use-v-on-exact
enforce usage of `exact` modifier on `v-on`

vue/use-v-on-exact

enforce usage of exact modifier on v-on

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

📖 Rule Details

This rule enforce usage of exact modifier on v-on when there is another v-on with modifier.

<template>
  <!-- ✓ GOOD -->
  <button @click="foo" :click="foo"></button>
  <button v-on:click.exact="foo" v-on:click.ctrl="foo"></button>

  <!-- ✗ BAD -->
  <button v-on:click="foo" v-on:click.ctrl="foo"></button>
</template>

🔧 Options

{
  "vue/use-v-on-exact": ["error"]
}

👫 Related rules

📚 Further reading

🔍 Implementation