Skip to content

Conversation

@KLewin23
Copy link
Contributor

Adds the option to be able to sort within import groups by length mentioned #76, choices are

  • asc shortest to longest
  • desc longest to shortest
  • null no length rule applied

After 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

@devlsh
Copy link

devlsh commented Apr 24, 2023

Would love to have this!

@expiritus2
Copy link

I also would love to have this. When it will be on the prod guys?

@KLewin23
Copy link
Contributor Author

Had to update the branch, think it needs reaproving

@spookyuser
Copy link

If this gets merged prettier can be renamed prettiest :)

@jackdh
Copy link

jackdh commented Sep 29, 2023

+1 for this, could we merge it?

@KLewin23
Copy link
Contributor Author

Gonna need someone to approve and merge it, keep coming back to it approved with merge blocks

@KLewin23
Copy link
Contributor Author

@annesnour03 can you approve so I can get this put away

@KLewin23
Copy link
Contributor Author

I still cant merge it @annesnour03 so idk if you can if not... it waits even more XD

@spookyuser
Copy link

image

@jackdh
Copy link

jackdh commented Nov 16, 2023

@ayusharma @byara come to our rescue please!

@Miguel-A-Jara
Copy link

Any news on this :)? @ayusharma & @byara

@Dugnist
Copy link

Dugnist commented Aug 17, 2024

@ayusharma @byara please add this

@KLewin23
Copy link
Contributor Author

1 year later XD

@KLewin23
Copy link
Contributor Author

KLewin23 commented Nov 25, 2024

@ayusharma Could someone approve / merge this again please

@OwenMelbz
Copy link

👀

@Miguel-A-Jara
Copy link

So sad that we've been waiting for this feature for so long and nobody can merge it!

@spookyuser
Copy link

I think react 20 will be published before this pr gets merged

importOrderSeparation,
importOrderSortSpecifiers,
importOrderGroupNamespaceSpecifiers,
importOrderGroupNamespaceSpecifiers,importOrderSortByLength

Choose a reason for hiding this comment

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

Suggested change
importOrderGroupNamespaceSpecifiers,importOrderSortByLength
importOrderGroupNamespaceSpecifiers,
importOrderSortByLength

Copy link
Contributor Author

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

Copy link
Contributor Author

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

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! 😉

Copy link
Contributor Author

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 😅

Copy link

@trueberryless trueberryless left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@dingshaohua-com
Copy link

love this!

@dingshaohua-com
Copy link

dingshaohua-com commented Apr 24, 2025

look this: prettier-plugin-sort-imports,can do this work

@spookyuser
Copy link

https://manifold.markets/SpookyUser/pr-224-add-sort-by-length-option-me?play=true

@dingshaohua-com
Copy link

Everyone clearly loves this configuration option, so why on earth do the maintainers steadfastly refuse to merge it? I just can’t figure it out.

@Miguel-A-Jara
Copy link

Any news on this :)? @ayusharma & @byara

@byara
Copy link
Collaborator

byara commented Oct 17, 2025

Hey @vladislavarsenev could you please take a look at this?

@vladislavarsenev vladislavarsenev changed the base branch from main to v6 October 17, 2025 07:52
@vladislavarsenev vladislavarsenev self-requested a review October 17, 2025 07:54
@vladislavarsenev
Copy link
Collaborator

Thank you for such a clean and useful PR! it's time to merge, this PR is old enough now

@vladislavarsenev vladislavarsenev merged commit e4a1b27 into trivago:v6 Oct 17, 2025
3 checks passed
@KLewin23
Copy link
Contributor Author

omg its in 2 years! thanks @vladislavarsenev people rejoice

@spookyuser
Copy link

we are potentially so back

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.