Skip to content
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

require-v-deep-argument | should fix with :deep() #228

Closed
seahindeniz opened this issue Aug 2, 2022 · 4 comments · Fixed by #259
Closed

require-v-deep-argument | should fix with :deep() #228

seahindeniz opened this issue Aug 2, 2022 · 4 comments · Fixed by #259
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@seahindeniz
Copy link

seahindeniz commented Aug 2, 2022

Hi!
Is it possible to configure vue-scoped-css/require-v-deep-argument rule to apply fixes with :deep() instead of ::v-deep for Vue 3 projects?

As stated in the following articles, the :deep() is currently supported syntax over the deprecated ::v-deep syntax.

@ota-meshi
Copy link
Member

So far there are rules to convert to ::v-deep() instead of ::v-deep, but no rules to convert to :deep(). Could you please open a PR to add the new rule?

https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-deep-argument.html

@seahindeniz seahindeniz changed the title no-unused-selector | should fix with :deep() require-v-deep-argument | should fix with :deep() Aug 2, 2022
@seahindeniz
Copy link
Author

Sure, I'll take a look at it later.
But the thing is, do you think this issue should lead to have a new rule?

I mean, with the next version, there can be a breaking change that could state the changes over the rule. It can also support converting the deprecated selector to the supported one 🤔
What do you think?

@ota-meshi
Copy link
Member

I think we should add a new rule.
Also, I think it would be useful if that rule could also check and convert v-global, etc.

https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md

@ota-meshi
Copy link
Member

ota-meshi commented Aug 3, 2022

Note that the new rule does not check for v-deep, which has no arguments.

.a ::v-deep .b {}

Simply replacing it will break the selector.

.a ::deep .b {}

An already existing checking rule makes it a safe replaces.
https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-deep-argument.html

The new rule checks for v-deep with arguments.

.a ::v-deep(.b) {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
2 participants