Skip to content

vue/attribute-hyphenation doesn't work on <slot> element #1808

Closed
@yusufkandemir

Description

@yusufkandemir

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.9.0
  • eslint-plugin-vue version: 8.5.0
  • Node version: 16.14.0
  • Operating System: Windows 11 21H1 22000.493 - (WSL) Ubuntu 20.04.3 LTS(Kernel: 5.10.93.2-microsoft-standard-WSL2)

Please show your full configuration:

/* eslint-env node */
module.exports = {
  root: true,
  extends: [
    "plugin:vue/vue3-recommended",
    "eslint:recommended"
  ],
  env: {
    "vue/setup-compiler-macros": true,
  },
};

What did you do?

<template>
  <div style="color: red;">
    <slot camelCase withValue="foo" :withBind="1" fooBar-BAZ_QuX />
  </div>
</template>

What did you expect to happen?
I expect warnings like this to appear:

Attribute 'withVariableBind' must be hyphenated. eslint(vue/attribute-hyphenation)

What actually happened?

Nothing happens.

Repository to reproduce this issue

https://github.com/yusufkandemir/eslint-plugin-vue-slot-issue

Might be related to 602d80f

<slot> is a native HTML element(related to Web Components), but the rule should also run on that, just like it used to do before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions