-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[import/order] Regression in behavior with parent and sibling #2685
Comments
According to the 347d78b change, this is not a bug. The change was made to specifically address this specific use case (as far as I understand it) |
@JohnnyDevNull how many of those changes are fixable with the autofixer? |
We use a similar configuration to @JohnnyDevNull in a large codebase and the import abc from '../../abc'
import def from '../def'
import ghi from './ghi'
import jkl from './jkl' But in 2.27 it's forcing the following order, which doesn't make sense to us: import ghi from './ghi'
import jkl from './jkl'
import abc from '../../abc'
import def from '../def' It looks like our only workaround right now would be to change our config to put This regression does seem to come from this change:
Looking at #2396, it looks like the intent was to sort forward slashes (
But the change also triggered sorting the So the |
This comment was marked as duplicate.
This comment was marked as duplicate.
Quick progress update, I have a fix for this working locally. I'm working on adding a few more unit test cases to maintain code coverage. I should have a PR up by the end of the week. |
@Pearce-Ropion How's this coming along? |
I've put up #2721. I think it needs more unit testing but figured I'd get the PR out there |
It takes too long to run. We have round about 300 libraries in a NX Monorepo. It's impossible to get this through a code review without having new merge conflicts within a week. The only solution is to keep the local path as before or uninstalling the plugin sadly to say. So we stay at 2.26.0 until it's fixed or we have to remove it because of eslint version upgrades. |
We're also downgrading to 2.26.0 in TinyMCE to avoid this issue, the PR that resulted was too much |
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
for anyone can't wait, recommend: https://github.com/lydell/eslint-plugin-simple-import-sort |
Since Version 2.27.0 we've recognized a change in over 500 files with the ordering rule:
For example:
@my-local-package/mysub-path
@my-local-package/mysub/path
They are now handled different than before and leads to hundres of linting errors where no before.
The text was updated successfully, but these errors were encountered: