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

[Update] Make vue/attributes-order fixable #405

Merged
merged 21 commits into from
Apr 1, 2018

Conversation

ota-meshi
Copy link
Member

This PR makes vue/attributes-order fixable. #401
In case of Attribute "A" should go before "B" error message, autofix will move A before B

michalsnik and others added 17 commits January 28, 2018 23:55
* [Update] Make `vue/max-attributes-per-line` fixable

* [fix] bug and style

* [fix] Switch indent calculation method with node and attribute

* [fix] don't handle indentation

* [add] autofix test max-attributes-per-line.js
* [Update] Make `vue/order-in-components` fixable

This Commit makes `vue/order-in-components` fixable.
In case of `The "A" property should be above the "B" property` error, autofix will move A before B

* [fix] fail test at [email protected]

* [fix] If there is a possibility of a side effect, don't autofix

* [fix] failed test at node v4

* [update] use Traverser

* [fix] failed test [email protected]

* [fix] I used `output: null` to specify "not fix"
Copy link
Member

@michalsnik michalsnik left a comment

Choose a reason for hiding this comment

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

Thank you for working on this @ota-meshi :) Could you please add two more test cases with more than 2 errors, and completely messed order of different properties and the same with different order setting passed.

@michalsnik michalsnik self-assigned this Mar 22, 2018
@ota-meshi
Copy link
Member Author

@michalsnik
Thank you for review!
I added a test case that your requested.
Please check again it.

dbb945d

@jeremyzahner
Copy link

@ota-meshi @michalsnik Just applied this branch to a codebase with more than 400 attributes-order errors and it worked smoothly.

@michalsnik
Copy link
Member

Music to my ears! Thank you @ota-meshi awesome work :)

@michalsnik michalsnik merged commit a5391f1 into vuejs:master Apr 1, 2018
@ota-meshi ota-meshi deleted the develop/attributes-order--fixable branch April 1, 2018 13:54
@samit4me
Copy link

samit4me commented Apr 2, 2018

Thank you so much @ota-meshi, really looking forward to using this 🎉 Does anyone know when this will be released? Will be a huge time saver for them old codebase.

@michalsnik
Copy link
Member

michalsnik commented Apr 19, 2018

Sorry guys it took so long... But I just released v4.5.0, enjoy! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants