prettier-plugin-shorten-imports

JSON →
library 0.0.3 ·javascript
verified Apr 27, 2026

Prettier plugin that rewrites local import and export specifiers to the shortest path depth based on tsconfig.json or jsconfig.json paths mappings. Version 0.0.3, released early 2023, with no further updates since. Supports .js, .jsx, .ts, .tsx, and .vue files, preserving file extensions and normalizing to POSIX separators. It compares relative paths and path aliases, keeping the shortest depth, and skips specifiers resolving to node_modules or outside the project root. Differentiators: integrates with Prettier formatting, avoids long relative paths, respects existing TypeScript/JavaScript path aliases, and merges paths from extended tsconfig chains.

total hits 13
actors 4 distinct systems
last hit 1d ago AhrefsBot
GPTBot
2
ClaudeBot
1
Humans
2

top countries 🇳🇴 Norway · 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇬🇧 United Kingdom