vuejs / eslint-plugin-vue

Official ESLint plugin for Vue.js
https://eslint.vuejs.org/
MIT License
4.47k stars 667 forks source link

refactor: store the defineEmits variable name #2592

Closed waynzh closed 1 week ago

waynzh commented 2 weeks ago

related to #2585

Refactored to store the defineEmits variable name for checking defineEmits variable name usage in the template.

waynzh commented 2 weeks ago

yes, can check out here no-unused-emit-declarations L105 + require-explicit-emits L474

FloEdelmann commented 2 weeks ago

I'm confused. It sounds like there are behavior changes the rules? But none of the existing tests fail, so the behavior changes should be covered by new tests.

waynzh commented 2 weeks ago

Does this add support for other cases previously not covered

Sry, I mean NO 🤖, this does not add support for any additional cases. It is purely a refactor of the existing code, as I found the previous implementation to be somewhat redundant and wanted to keep it consistent with this https://github.com/vuejs/eslint-plugin-vue/pull/2585.