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

🐛Fix: v-bind order in vue/attribute-order rule #421

Merged
merged 7 commits into from
Jul 24, 2018

Conversation

ydfzgyj
Copy link
Contributor

@ydfzgyj ydfzgyj commented Mar 6, 2018

close #410 , close #422

- OTHER_ATTR
ex: 'customProp="foo"'
ex: 'custom-prop="foo"', 'v-bind:prop="foo"', ':prop="foo"', 'v-custom-directive'
Copy link
Member

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

Copy link
Contributor Author

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.

@ydfzgyj
Copy link
Contributor Author

ydfzgyj commented Mar 22, 2018

Only solved the conflict but did not change anything else

@michalsnik michalsnik requested a review from chrisvfritz March 22, 2018 05:22
@michalsnik michalsnik self-assigned this Mar 22, 2018
Copy link
Contributor

@chrisvfritz chrisvfritz left a 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.

@@ -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:
Copy link
Contributor

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.

@michalsnik michalsnik added this to the v5.0.0 milestone Mar 24, 2018
@michalsnik michalsnik changed the title Fix: v-bind order in vue/attribute-order rule 🐛Fix: v-bind order in vue/attribute-order rule Apr 1, 2018
@michalsnik michalsnik merged commit b8743d0 into vuejs:master Jul 24, 2018
@ydfzgyj ydfzgyj deleted the v-bind branch July 25, 2018 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants