JS.VUE.NO.DEPRECATED.DOLLAR.LISTENERS.API

Disallow using deprecated '$listeners' (in Vue.js 3.0.0+)

vue/no-deprecated-dollar-listeners-api

disallow using deprecated $listeners (in Vue.js 3.0.0+)

Rule Details

This rule reports use of deprecated $listeners. (in Vue.js 3.0.0+).

{'vue/no-deprecated-dollar-listeners-api': ['error']}

Copy
<template>
  <!-- BAD -->
  <MyInput v-on="$listeners">
</template>
<script>
export default {
  computed: {
    listeners() {
      return {
        /* BAD */
        ...this.$listeners,
        input() { /* */ }
      }
    }
  }
}
</script>

Options

Nothing.

Further Reading

  • Vue RFCs - 0031-attr-fallthrough (https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)

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/