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

Sort imports with dprint instead of eslint #58058

Merged
merged 2 commits into from
Apr 3, 2024

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
25 checks passed
@jakebailey jakebailey deleted the sort-imports-with-dprint branch April 3, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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