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

Sorting unassigned import does not work #104

Closed
iliubinskii opened this issue Apr 12, 2022 · 2 comments
Closed

Sorting unassigned import does not work #104

iliubinskii opened this issue Apr 12, 2022 · 2 comments

Comments

@iliubinskii
Copy link

Thx for the plugin.
It looks like "imports" rule does not sort unassigned import:

import "./second";
import "./first";

With assigned import it works fine.

@lydell
Copy link
Owner

lydell commented Apr 12, 2022

Hi!

As mentioned in https://github.com/lydell/eslint-plugin-simple-import-sort#not-for-everyone and https://github.com/lydell/eslint-plugin-simple-import-sort#is-sorting-importsexports-safe, those are considered “side effect” imports and they always stay in the original order for safety. That isn’t and will not be configurable.

@iliubinskii
Copy link
Author

Thx for the explanation.
For anyone who still wants to sort unassigned import, I found that "import/order" has "warnOnUnassignedImports".

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