Skip to content

Files

Latest commit

 

History

History
34 lines (23 loc) · 683 Bytes

use-v-on-exact.md

File metadata and controls

34 lines (23 loc) · 683 Bytes

Pattern: Missing use of exact modifier on v-on

Issue: -

Description

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"]
}
```.

## Further Reading

* [eslint-plugin-vue - use-v-on-exact](https://eslint.vuejs.org/rules/use-v-on-exact.html)