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

[Feat] sort import alias by original module name, not alias #195

Open
Airkro opened this issue Nov 18, 2024 · 1 comment
Open

[Feat] sort import alias by original module name, not alias #195

Airkro opened this issue Nov 18, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Airkro
Copy link

Airkro commented Nov 18, 2024

Is your feature request related to a problem?
Please describe a clear and concise description of what the problem is. E.g. I'm always frustrated when [...]

Describe the solution you'd like

Currently, this plugin sorts alias imports by alias:

import { xyz as abc, efg } from 'abc';

↓↓

import { xyz as abc, efg } from 'abc';

And this's how https://github.com/lydell/eslint-plugin-simple-import-sort do:

import { xyz as abc, efg } from 'abc';

↓↓

import { efg, xyz as abc } from 'abc';

I think this makes more reasonable, and is more conducive to git diff.

@IanVS IanVS added the enhancement New feature or request label Nov 18, 2024
@IanVS
Copy link
Owner

IanVS commented Nov 18, 2024

I don't have a strong opinion here, and I expect that reasonable people could disagree on how to order these. We wouldn't want to add an option to control this, and changing the behavior would need to happen in a major release, and could cause disruption to existing projects. I'll leave this open to see what others think, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants