📦 VSCode Extension: Sort & Group TS/JS Imports – Smart Import OrganizerA powerful and opinionated import sorter for TypeScript/JavaScript files.
This extension intelligently reformats and reorders your ✨ Features✅ Automatically removes duplicate imports
✅ Merges multi-line and broken imports into single lines before processing
✅ Sorts imports alphabetically within groups
✅ Groups imports based on path similarity
✅ Special handling for grouped imports with odd count (single-line item comes first)
✅ Ignores non-import code
✅ Works with both TypeScript ( ⚙️ How It WorksStep 1: Scans the selected code (or entire file) for import statements. Step 2:
Normalizes import lines (removes line breaks between Step 3: Groups import statements based on similarity in module path. Step 4: Within each group, sorts individual items and reorders single-line and multi-line imports based on best-practice formatting. Example: Before
After
🚀 How To Use
📦 Requirements
🧠 Extension Commands
💬 Feedback & IssuesFound a bug or want to request a feature? Open an issue 📝 LicenseMIT © 2025 |