-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Add new vue/enforce-style-attribute
rule
#2110
Add new vue/enforce-style-attribute
rule
#2110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2109 (comment)
@ota-meshi Sorry for the very long absence 🙏 I made some modifications to the code to mimick how it's done in the Thank you 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That rule sounds good to me. Could you undraft this PR when it is ready for review?
@ota-meshi Thank you for taking a look! I will update the docs to reflect the new options and mark it as ready for review. |
@ota-meshi (Looping in @FloEdelmann as well) I updated the docs but I have a question. When I run
I'm not sure why. This rule does not have a fixer at the moment, so that paragraph is not required but it keeps being added automatically. Is it ok to remove it and push the code? Is that not going to make the CI fail? |
Also, I'm now wondering if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review.
{ | ||
"vue/enforce-style-attribute": [ | ||
"error", | ||
{ "allow": ["scoped", "module", "no-attributes"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I think the name no-attributes
is misleading. lang="scss" has attributes. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... that could be confusing 🤔 Maybe using plain
like in the other plugin is the best choice here. If you agree I'll rename it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think plain
is better 👍
@ota-meshi I renamed the option to |
Yeah. CI error should be fixed by #2357. So ignore it for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
This PR adds a new rule as proposed in this issue.