We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checklist
Tell us about your environment
Please show your full configuration:
/* eslint-env node */ require('@rushstack/eslint-patch/modern-module-resolution') module.exports = { root: true, 'extends': [ 'plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier/skip-formatting' ], parserOptions: { ecmaVersion: 'latest' }, rules: { "vue/no-unused-emit-declarations": "error", } }
What did you do?
<script setup lang="ts"> const emit = defineEmits({"foo": () => true}) </script> <template> <button @click="emit('foo')">Foo</button> </template> </style>
What did you expect to happen? The emit shouldn't be flagged as unused since it's used in the template
What actually happened?
The emit is flagged as unused:
6:27 error `foo` is defined as emit but never used vue/no-unused-emit-declarations
Repository to reproduce this issue
https://github.com/henribru/eslint-unused-emit-repro
The text was updated successfully, but these errors were encountered:
It seems like it works if you use $emit in the template.
$emit
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
The emit shouldn't be flagged as unused since it's used in the template
What actually happened?
The emit is flagged as unused:
Repository to reproduce this issue
https://github.com/henribru/eslint-unused-emit-repro
The text was updated successfully, but these errors were encountered: