-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Standardize on type-only imports #32368
Comments
cc @blazejkustra @fabioh8010 @chrispader can one of you comment for assignment please? |
@blazejkustra you wanted to take this one? Otherwise i can also open a PR :) |
@chrispader Sure, you can take it 😄 |
Created the PR here: #32475 |
This issue has not been updated in over 15 days. @chrispader, @roryabraham eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
We're waiting on an upstream PR from @chrispader here. This isn't very high priority, so I'm not opposed to just closing this out for now so it's not a distraction. Up to you @chrispader |
Starting to work on this now! Got some spare cycles.. |
Turns out, we don't need an upstream change 🎉 There's a rule for enforcing type specifier style: PR updated and ready for review 🚀 |
@roryabraham i think we can merge this one :) |
@chrispader what one? 😄 I already merged #32475 last week. That said, I think we can close this issue out since it was a compile-time-only change and we didn't use a C+ so no additional payments are due |
Slack context: https://expensify.slack.com/archives/C01GTK53T8Q/p1701371123201489
Problem
We are inconsistent about how we import types. Type-only imports are preferred because they disappear at runtime, making the program more lightweight. It also improves code clarity because it's obvious that a type is being imported and not some other value.
Solution
Enable the consistent-type-imports lint rule w/
prefer: type-imports
Issue Owner
Current Issue Owner: @chrispaderThe text was updated successfully, but these errors were encountered: