-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(style): imports grouping, trivial #830
Conversation
Separate groups of third party and local imports
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think this file just hadn't been worked in since this style of importing was implemented
An additional thought on the topicWhat about having imports sorted/grouped by the linter? Something like prettier-plugin-sort-imports would do the job with minimal boilerplate. I wouldn't disagree if some consider that grouping imports by default may be too opinionated, but I don't think anyone could reasonably argue against enforcing import order by default.. Much like |
There's now Organize Imports in VS Code — wonder if it's something that could be unsed instead of prettier plugin hackery? |
Hey all, I know there's a lot of solutions/packages out there for "sortings imports", but I think one in particular is the best fit for the prettier + typescript philosophies: https://github.com/simonhaenisch/prettier-plugin-organize-imports From there docs:
In other words, developers should not have to care about how imports are grouped. The plugin itself doesn't even know. Just let the typescript compiler decide. Also, |
Separate groups of third party and local imports
This is a trivial style fix. Third party library imports are grouped apart from local imports throughout the project, I guess this file shouldn't be an exception.
✅ Checklist
I assume this change is too trivial to require anything from the checklist other than following the commit convention
Changelog
[Not required]
Screenshots
[Not required]
💯