- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 679
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
🐛Fix: v-bind order in vue/attribute-order
rule
#421
Conversation
docs/rules/attributes-order.md
Outdated
- OTHER_ATTR | ||
ex: 'customProp="foo"' | ||
ex: 'custom-prop="foo"', 'v-bind:prop="foo"', ':prop="foo"', 'v-custom-directive' |
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 don't think we should mix other attributes with bindings.
Let's keep both groups: TWO_WAY_BINDINGS
and BINDINGS
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.
It's a common situation that when user needs to change a static property value to a dynamic binding value. If we separate them into two groups, the user may have to modify the order of these properties and feel confused. Maybe it's still better to let user themselves to sort these attributes.
Only solved the conflict but did not change anything else |
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.
Looks great to me! 🙂 I only noticed one small typo that I commented on.
docs/rules/attributes-order.md
Outdated
@@ -4,7 +4,7 @@ | |||
|
|||
## :book: Rule Details | |||
|
|||
This rule aims to enforce ordering of component attributes. The default order is specified in the [Vue styleguide](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended) and is: | |||
This rule aims to enfore ordering of component attributes. The default order is specified in the [Vue styleguide](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended) and is: |
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.
Looks like a typo here.
vue/attribute-order
rulevue/attribute-order
rule
close #410 , close #422