Examples of correct code for this rule:
import { abc } from "testing";
import { x } from "tester";
import { y } from "test";
import { x } from "test";
import { y } from "tester";
import { abc } from "testing";
Examples of incorrect code for this rule:
import { x } from "test";
import { abc } from "testing";
import { y } from "tester";
The default behaviour of this rule is a 'top-heavy' order. Set reverseOrder
to true
to use a 'bottom-heavy' order.
false
(default)true
"import-order-aesthetic/order-import-by-length": ['error', { reverseOrder: true }],
If you want to order your imports by something sensible...