Skip to content

Conversation

@jakebailey
Copy link
Member

A few people have expressed that they'd prefer if the formatter did this rather than eslint. dprint can do this a lot faster without the linter errors; if you save on format it'll be extra good.

The downside is that we will lose automatic grouping, until maybe dprint/dprint-plugin-typescript#493. That's something I was relying on in #51455 to ensure the namespace imports always came first, but that could be achieved another way.

I also discovered dprint/dprint-plugin-typescript#620, but that's not a very bad bug.

I had to disable formatting in _namespaces, as those import orders matter and dprint does not have the ability to ignore regions: dprint/dprint-plugin-typescript#411

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 3, 2024
@jakebailey jakebailey merged commit f52f7b9 into microsoft:main Apr 3, 2024
@jakebailey jakebailey deleted the sort-imports-with-dprint branch April 3, 2024 18:27
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants