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

📝 Error of sorting grouped imports in alphabetical order #3475

Closed
1 task done
gggchaseggg opened this issue Jul 19, 2024 · 1 comment
Closed
1 task done

📝 Error of sorting grouped imports in alphabetical order #3475

gggchaseggg opened this issue Jul 19, 2024 · 1 comment

Comments

@gggchaseggg
Copy link

gggchaseggg commented Jul 19, 2024

Environment information

Biome playground

Configuration

Configuration from playground link

Playground link

When sorting imports in a group, if you specify a package with a name alphabetically smaller than the first one in the list as the last one in the group, then it flies out of the group and is shown before it. To reproduce this, you can change the name of the package at the “right here” comment.
https://biomejs.dev/playground/?code=LwAvACAAcABhAGMAawBhAGcAZQBzAAoAaQBtAHAAbwByAHQAIAB7ACAARgBDACAAfQAgAGYAcgBvAG0AIAAnAHIAZQBhAGMAdAAnAAoAaQBtAHAAbwByAHQAIAB7ACAARABvAHUAZwBoAG4AdQB0ACAAfQAgAGYAcgBvAG0AIAAnAHIAZQBhAGMAdAAtAGMAaABhAHIAdABqAHMALQAyACcACgBpAG0AcABvAHIAdAAgAHsAIAB0AGUAcwB0ADIAIAB9ACAAZgByAG8AbQAgACcAYQAnACAALwAvACAAcgBpAGcAaAB0ACAAaABlAHIAZQAKAGkAbQBwAG8AcgB0ACAAewAgAHQAZQBzAHQAIAB9ACAAZgByAG8AbQAgACcAdABlAHMAdAAnAAoACgBpAG0AcABvAHIAdAAgAHsAIABDAGgAYQByAHQAVwByAGEAcABwAGUAcgAgAH0AIABmAHIAbwBtACAAJwAuAC8ARABvAHUAZwBoAG4AdQB0AEMAaABhAHIAdAAuAHMAdAB5AGwAZQBzACcACgBpAG0AcABvAHIAdAAgAHsAIABDAGgAYQByAHQAcwBTAHQAYQB0AGkAcwB0AGkAYwBzAFAAcgBvAHAAcwAgAH0AIABmAHIAbwBtACAAJwAuAC4ALwAuAC4ALwAuAC4ALwAuAC4ALwAuAC4ALwAuAC4ALwAuAC4ALwBtAG8AZABlAGwAcwAnAAoAaQBtAHAAbwByAHQAIAB7ACAAbwBwAHQAaQBvAG4AcwAgAH0AIABmAHIAbwBtACAAJwAuAC8ARABvAHUAZwBoAG4AdQB0AEMAaABhAHIAdAAuAGMAbwBuAHMAdABhAG4AdABzACcACgBpAG0AcABvAHIAdAAgAHsACgAgACAATABlAGcAZQBuAGQALAAKACAAIAB1AHMAZQBUAG8AbwBsAHQAaQBwAFMAdABhAHQAZQAsAAoAIAAgAFQAbwBvAGwAdABpAHAAIABhAHMAIABDAHUAcwB0AG8AbQBUAG8AbwBsAHQAaQBwACwACgB9ACAAZgByAG8AbQAgACcALgAuAC8AYwBvAG0AcABvAG4AZQBuAHQAcwAnAAoAaQBtAHAAbwByAHQAIAB7AAoAIAAgAGYAbwByAG0AYQB0AGkAbgBnAEQAYQB0AGEARgBvAHIARABvAHUAZwBoAG4AdQB0ACwACgAgACAAZgBvAHIAbQBhAHQAaQBuAGcATABlAGcAZQBuAGQARgBvAHIARABvAHUAZwBoAG4AdQB0ACwACgB9ACAAZgByAG8AbQAgACcALgAvAEQAbwB1AGcAaABuAHUAdABDAGgAYQByAHQALgBoAGUAbABwAGUAcgBzACcACgA%3D

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos
Copy link
Member

Actually, the import is always part of the group. Groups are formed by separating them using a blank line. This doesn't take comments into account.

The behavior could be improved once #3177 get implemented :)

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

No branches or pull requests

2 participants