Skip to content

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

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
yusufkandemir opened this issue Feb 25, 2022 · 0 comments · Fixed by #1826
Closed
2 tasks done

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

yusufkandemir opened this issue Feb 25, 2022 · 0 comments · Fixed by #1826

Comments

@yusufkandemir
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.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.

doug-wade added a commit to doug-wade/eslint-plugin-vue that referenced this issue Mar 24, 2022
ota-meshi pushed a commit that referenced this issue Apr 4, 2022
* Fix #1808: Lint slots in attribute-hyphenation

* remove includeSlots option

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

Successfully merging a pull request may close this issue.

1 participant