Skip to content

Conversation

IanVS
Copy link
Owner

@IanVS IanVS commented Aug 27, 2025

Closes #188

This adds a new option, importOrderSafeSideEffects, which is an array of regex patterns (similar to importOrder) specifying side-effect-only imports which are considered "safe" to reorder along with the rest of imports.

Copy link
Collaborator

@fbartho fbartho left a comment

Choose a reason for hiding this comment

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

Great work. This is what I would have liked to see if we ever implemented this. I'm comfortable with the default being nothing, and the documentation is sufficiently verbose for now.

I recognize and mourn the "complexity" of adding an additional parameter, but I'm happy we're meeting more people's needs.

@IanVS
Copy link
Owner Author

IanVS commented Aug 28, 2025

Thanks for the review!

@IanVS IanVS merged commit 1f2670a into main Aug 28, 2025
8 checks passed
@IanVS IanVS deleted the safe-side-effects-2 branch August 28, 2025 11:34
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.

Allow specifying "safe" side-effect imports
2 participants