[import/order] Breaking change in v2.27 (original) (raw)

In version 2.27.0 it was introduced a new strategy which splits the imports paths in segments and compares them independently.

However, this leads to different results for the same inputs in some cases, for example:

import {screen} from '@testing-library/react'; import {checkDropdown} from '@testing/form';

this is the "right" order as by v2.26 because:

compareString('@testing-library/react', '@testing/form') === -1

but in v2.27 it is reported as error because:

compareString('@testing-library', '@testing') === 1

I don't know if the current behavior is the right one, but it is definitely a breaking change