-
Notifications
You must be signed in to change notification settings - Fork 146
Add sort by length option #224
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
base: main
Are you sure you want to change the base?
Conversation
Would love to have this! |
I also would love to have this. When it will be on the prod guys? |
Had to update the branch, think it needs reaproving |
If this gets merged prettier can be renamed prettiest :) |
+1 for this, could we merge it? |
Gonna need someone to approve and merge it, keep coming back to it approved with merge blocks |
Co-authored-by: annes <[email protected]>
@annesnour03 can you approve so I can get this put away |
I still cant merge it @annesnour03 so idk if you can if not... it waits even more XD |
@ayusharma @byara come to our rescue please! |
Any news on this :)? @ayusharma & @byara |
@ayusharma @byara please add this |
1 year later XD |
@ayusharma Could someone approve / merge this again please |
👀 |
So sad that we've been waiting for this feature for so long and nobody can merge it! |
I think react 20 will be published before this pr gets merged |
src/utils/get-sorted-nodes.ts
Outdated
@@ -21,7 +21,7 @@ export const getSortedNodes: GetSortedNodes = (nodes, options) => { | |||
const { | |||
importOrderSeparation, | |||
importOrderSortSpecifiers, | |||
importOrderGroupNamespaceSpecifiers, | |||
importOrderGroupNamespaceSpecifiers,importOrderSortByLength |
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.
importOrderGroupNamespaceSpecifiers,importOrderSortByLength | |
importOrderGroupNamespaceSpecifiers, | |
importOrderSortByLength |
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.
should be in now, im gonna go through and check it still works as the merge may not be ok given how long its been
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.
If you're still around, latest commit should fix any tests, update docs / types and work
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 good to me, I really appreciate the effort. Hopefully some maintainer is able to merge this wonderful PR! 😉
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 if you approve the pr again, we can get it in. Unless Github is leading me astray telling me it needs you to review.. if not the wait goes on 😅
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 🎉
love this! |
look this: https://github.com/SanderRonde/prettier-plugin-sort-imports#readme,can do this work |
Adds the option to be able to sort within import groups by length mentioned #76, choices are
asc
shortest to longestdesc
longest to shortestnull
no length rule appliedAfter length imports are sorted alphabetically
I have an internal fork with this implemented already so this doesn't affect me, but this is the general setup I have been using