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: add Prettier plugin to organize imports #70

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

astone123
Copy link
Collaborator

Closes #57

This PR adds the prettier-plugin-organize-imports plugin for Prettier since Prettier doesn't support organizing imports out of the box.

@astone123 astone123 self-assigned this Oct 23, 2023
@wweitzel
Copy link
Owner

@astone123

  1. How do I use this? Is there a command I run manually? Or does vscode support this?
  2. Does our linter check for this in CI?

@astone123
Copy link
Collaborator Author

astone123 commented Oct 27, 2023

It's a Prettier plugin, so it just runs with our existing commands for prettier. If you run "format" it re-writes the imports and if you run "check-format" it checks that the imports are formatted, same as any other code format rules.

If you have VSCode setup to format on save with Prettier, it'll format on save.

@wweitzel
Copy link
Owner

Nice. I figured out my issue. I forgot to run bun install 🤭

@wweitzel wweitzel merged commit 07ae8f8 into master Oct 27, 2023
3 checks passed
@wweitzel wweitzel deleted the prettier-organize-imports branch October 27, 2023 21:38
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.

Sort imports automatically when running the formatter
2 participants