Skip to content

require-explicit-slots does not recognize slot names enclosed in quotes #2391

New issue

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

Closed
2 tasks done
andreww2012 opened this issue Feb 2, 2024 · 2 comments · Fixed by #2397
Closed
2 tasks done

require-explicit-slots does not recognize slot names enclosed in quotes #2391

andreww2012 opened this issue Feb 2, 2024 · 2 comments · Fixed by #2397
Labels

Comments

@andreww2012
Copy link

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.56.0
  • eslint-plugin-vue version: 9.21.1
  • Vue version: 3.4.15
  • Node version: 18.18.0
  • Operating System: Not relevant

Please show your full configuration:

Not relevant

What did you do?
What did you expect to happen?
What actually happened?

require-explicit-slots does not recognize slot names enclosed in quotes. Sometimes the quotes are necessary to have a slot name with a hyphen. It falsely reports that the slot was not explicitly defined using defineSlots.

Repository to reproduce this issue

The simplest reproduction is just going to the rule page on the eslint-plugin-vue site and enclose foo in any quotes like that:

defineSlots<{
  default(props: { msg: string }): any
  'foo'(props: { msg: string }): any
}>()
@so1ve
Copy link
Member

so1ve commented Feb 23, 2024

Should close this right? :)

@FloEdelmann
Copy link
Member

Yes, thanks for letting me know 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants