Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.66 KB

use-v-on-exact.md

File metadata and controls

54 lines (35 loc) · 1.66 KB
pageClass sidebarDepth title description since
rule-details
0
vue/use-v-on-exact
enforce usage of `exact` modifier on `v-on`
v5.0.0

vue/use-v-on-exact

enforce usage of exact modifier on v-on

  • ⚙️ This rule is included in all of "plugin:vue/essential", *.configs["flat/essential"], "plugin:vue/vue2-essential", *.configs["flat/vue2-essential"], "plugin:vue/strongly-recommended", *.configs["flat/strongly-recommended"], "plugin:vue/vue2-strongly-recommended", *.configs["flat/vue2-strongly-recommended"], "plugin:vue/recommended", *.configs["flat/recommended"], "plugin:vue/vue2-recommended" and *.configs["flat/vue2-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

Nothing.

👫 Related Rules

📚 Further Reading

🚀 Version

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

🔍 Implementation