-
Notifications
You must be signed in to change notification settings - Fork 823
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(eslint): optimize imports #1315
Conversation
Wow. Thank you for the PR! This is something I've always wanted to do! 🤩 Please wait a moment, I need to test this RP locally |
@LitoMore Can you resolve the conflict? |
c056f1e
to
22c8574
Compare
@BlackHole1 Conflict has been resolved. Please hold on other PRs until this one get merged. |
sort-imports
and import/order
sort-imports
and eslint-plugin-import
22c8574
to
41f34eb
Compare
sort-imports
and eslint-plugin-import
41f34eb
to
ac3b79d
Compare
ac3b79d
to
a173afc
Compare
How about eslint-plugin-simple-import-sort which keeps the order of side-effect imports. |
@crimx You can create another PR and try to replace them (based on this PR). I'm not going to take too much effort into it. |
I will be responsible for the revision of this PR as @LitoMore does not have the extra time to do it |
We can merge. Then change to |
Hey @LitoMore 👋 |
OK. Closing in favor of the new one. |
Changes
sort-imports
import/order
import/no-duplicates
@typescript-eslint/consistent-type-imports
I moved all unassigned imports (CSS/Less/MP3) to the bottom for a better visual.
When to disable it?
And I am using
eslint-disable-next-line import/order
to allow our unassigned sibling CSS/Less imports after those imports from package. Just to avoid some style override issues. Here is an example:I don't want to take too much effort on pathGroups. Using
eslint-disable-next-line import/order
is easilier.Tips
Use the split diff view for better visual.
Plan
I'm going to enable ESLint for all workspaces and root files in another PR.