Prettier Plugin: Sort Imports (by length or alphabetically)

JSON →
library 1.0.0 ·javascript
verified May 27, 2026

A Prettier plugin that automatically sorts import statements by line length or alphabetically. V1.7.0 active, released for Prettier 2.x+ (Node.js 12+). Differentiators: supports sorting by import line length (unique feature), flexible import type ordering (NPM packages vs local values vs local types), newline stripping between groups, and ignore comments. Competitors like @trivago/prettier-plugin-sort-imports focus on alphabetical/group-based sorting and do not offer length-based sorting.

total hits 23
actors 8 distinct systems
last hit 2d ago AhrefsBot
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇳🇴 Norway · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany