Skip to content

Allow scoped and module attributes to be used together #389

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

Open
myilmazjc opened this issue Mar 13, 2025 · 1 comment
Open

Allow scoped and module attributes to be used together #389

myilmazjc opened this issue Mar 13, 2025 · 1 comment

Comments

@myilmazjc
Copy link

myilmazjc commented Mar 13, 2025

Hello,

I am currently using the eslint-plugin-vue-scoped-css plugin and I have encountered a limitation regarding the use of scoped and module attributes together in <style> tags.

In the plugin settings, there is an allows option that takes an array of allowed attributes. However, due to a restriction in the repository, it is not possible to use both scoped and module attributes together.

Here is an example of what I am trying to achieve:

<template>
  <div class="$style.example">Hello World</div>
</template>

<style scoped module>
.example {
  color: red;
}
</style>

Currently, this results in an error due to the restriction. It would be very helpful if the plugin could support the use of both scoped and module attributes together.

Thanks

@ota-meshi
Copy link
Member

Thank you for posting this issue.

Could you please explain the context a bit more?

I don't use CSS modules that much so I'm not familiar with them. From what I understand, if we use CSS modules, we don't need Scoped CSS.

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

No branches or pull requests

2 participants