Skip to content

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

Closed
@andreww2012

Description

@andreww2012

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
}>()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions