Good news! If you're upgrading from the original TypeScript Hero extension, your settings will be automatically migrated on first startup.
All import-related settings from typescriptHero.imports.* are automatically copied to miniTypescriptHero.imports.*:
- All formatting settings (quotes, semicolons, spaces, etc.)
- Organize on save preference
- Sorting and removal settings
- Ignored libraries configuration
- Custom import grouping rules
- Runs once: Migration happens automatically the first time you activate Mini TypeScript Hero
- Preserves all levels: User, workspace, and workspace folder settings are all migrated
- Safe: Your original TypeScript Hero settings remain untouched
- Notification: You'll see a message confirming how many settings were migrated
Once your settings are migrated, you have two options:
- Keep both extensions: Both extensions can coexist, but you may want to disable one to avoid conflicts
- Uninstall TypeScript Hero: If you only need the import organization feature, you can safely uninstall the original extension
If the old TypeScript Hero extension is still active, you'll see a reminder in the migration notification suggesting you can disable it.
For migrated users, legacyMode is automatically set to true to match the original TypeScript Hero output format as closely as possible.
When enabled, legacy mode matches these old behaviors (including bugs) for maximum backward compatibility:
blankLinesAfterImports— Always preserves existing blank lines (ignores configured value)organizeSortsByFirstSpecifier— SILENTLY IGNORED (always sorts by library name within groups)⚠️ Bug replicationdisableImportsSorting— SILENTLY IGNORED (always sorts imports within groups)⚠️ Bug replication- Merge timing — Merges BEFORE removeTrailingIndex (old bug:
./lib/indexand./libwon't merge) - Type-only imports — Strips
import typekeywords (old TS <3.8 behavior) - Indentation — Always uses spaces (ignores
insertSpacessetting) - Crash handling — Gracefully handles cases that crashed old extension (silent fix)
Migrated users depend on consistent output format. Any change would create massive diffs across their codebase on first run, breaking trust. Legacy mode provides the closest match possible to the old extension's output, though some edge cases may differ due to the modern parser (ts-morph vs deprecated typescript-parser) and improved comment handling.
New users get legacyMode: false by default for correct behavior. You can toggle this setting anytime via the command palette or your configuration.
⚠️ IMPORTANT: WhenlegacyMode: true, certain config settings are silently ignored (see above). The extension does NOT warn about this - it's intentional for backward compatibility. If you need these settings to work, setlegacyMode: false.
If you're a migrated user and want to use modern mode:
- Review what changes: Read the legacy mode behaviors above
- Set
legacyMode: falsein your settings - Run organize imports on a test file to see the difference
- Commit the changes if you're happy with the new output
The differences will be minimal for most projects - mainly:
- More predictable blank line handling
- Better merge timing (./lib/index and ./lib will merge correctly)
- Preserved
import typesyntax for TypeScript 3.8+
If you've never used TypeScript Hero before, the migration simply won't run — no action needed! You'll start with legacyMode: false and modern best practices.