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

⭐️New: Add vue/no-static-inline-styles rule #843

Merged
merged 3 commits into from Dec 26, 2019

Conversation

ota-meshi
Copy link
Member

This PR adds the vue/no-static-inline-styles rule.
vue/no-static-inline-styles rule reports the static inline style given to the element.

We recommend moving the reported inline styles to the <style> element.


Close #826

@ota-meshi ota-meshi force-pushed the add-rule/no-static-inline-styles branch from 1d966df to 6483687 Compare February 28, 2019 14:52
@cde06
Copy link

cde06 commented Feb 28, 2019

Thank you so much for this PR!!
I hope it will be release soon.

}
if (!context.options[0] || !context.options[0].allowBinding) {
visitor[
"VAttribute[directive=true][key.name.name='bind'][key.argument.name='style']"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be [key.name='bind'][key.argument='style'] ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After #807, AST has been changed a bit to support dynamic argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course. Thank you for the explanation.

@ota-meshi ota-meshi self-assigned this Apr 2, 2019
@cde06
Copy link

cde06 commented Sep 6, 2019

Hello,
Can we release this fix or are we waiting something else?
Thanks

@ota-meshi ota-meshi merged commit 603a6e1 into master Dec 26, 2019
@ota-meshi ota-meshi deleted the add-rule/no-static-inline-styles branch December 26, 2019 05:08
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 this pull request may close these issues.

Rule proposal: vue/no-inline-styles
4 participants