A prettier plugin that sorts import statements by either their length in ascending order.
npm install --save-dev prettier-plugin-ascending-imports
The plugin will be loaded by Prettier automatically. No configuration needed. It will sort by import statement length by default.