Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

647baab · Jan 29, 2025

History

History
59 lines (43 loc) · 1.59 KB

no-deprecated-dollar-listeners-api.md

File metadata and controls

59 lines (43 loc) · 1.59 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-deprecated-dollar-listeners-api
disallow using deprecated `$listeners` (in Vue.js 3.0.0+)
v7.0.0

vue/no-deprecated-dollar-listeners-api

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

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

📖 Rule Details

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

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

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

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

🔍 Implementation