-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Unexpected import-x/sort issue in >=3.8 #351
Comments
Can you retry when PR #352 is merged? Thanks 🙏 |
Furthermore, |
Yes, great. The 3.8.1 release solved this issue! Further follow-up question if you don't mind: My current rule is set up like this: "import-x/order": [
2,
{
alphabetize: {
caseInsensitive: false,
order: "asc",
},
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "never",
},
], Mainly to avoid hard-coding any specific "symbols" since its a shared preset. And I therefore would expect any "relative" imports to naturally come after whatever symbols I choose in my tsconfig paths, is this assumption correct? |
@iCrawl Personally, I'm not sure how import-x handles this, but I believe we need to add the pathGroups configuration option to guide the plugin. |
Alright, thanks! |
Somewhere starting from 3.7.0 there seems to be some kind of bug introduced or at least a breaking change in behavior reading custom tsconfig paths.
v3.7.0...master
Previous result:
No errors.
After 3.8:
No change in userland code at all.
This obviously leads to errors where the visual editor, whether that be cursor, visual studio code or whatever wants to move those lines. But when I then try to commit and run the CLI it will complain because they shouldn't be moved around. This didn't happen in 3.7
The tsconfig paths are relatively simple as well:
Temporary fix for me: Downgrade and pin to 3.7.
The text was updated successfully, but these errors were encountered: