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

chore(web): auto sort imports #7118

Merged
merged 1 commit into from
Feb 14, 2024
Merged

chore(web): auto sort imports #7118

merged 1 commit into from
Feb 14, 2024

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Feb 14, 2024

Doesn't look like this plugin supports .svelte files yet, but it'll require and auto-fix .ts ones.

@benmccann
Copy link
Contributor

Looks like there's a feature request for Svelte support: simonhaenisch/prettier-plugin-organize-imports#39

@benmccann
Copy link
Contributor

I'll note that this may make formatting quite a bit slower judging from their issue tracker: simonhaenisch/prettier-plugin-organize-imports#114

@jrasm91 jrasm91 merged commit 747df0a into main Feb 14, 2024
26 checks passed
@jrasm91 jrasm91 deleted the chore/web-autosort-imports branch February 14, 2024 15:54
@benmccann
Copy link
Contributor

I checked with the Svelte maintainers about Svelte support for the prettier plugin and one suggested that it'd be better to focus on getting something https://github.com/lydell/eslint-plugin-simple-import-sort working since it has more advanced sorting capabilities. E.g. it will put node:-prefixed imports into a separate group as opposed to intermixing with the other imports

@jrasm91
Copy link
Contributor Author

jrasm91 commented Feb 14, 2024

I looked at that briefly, but auto fixing eslinting errors seems quite a bit different than "format on save" functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants