You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Fix audit findings and align documentation with implementation
Addressed all findings from external code review to ensure code quality,
documentation accuracy, and polite extension behavior.
Key fixes:
- Removed impolite command registration for 'typescriptHero.imports.organize'
(we now only register our own 'miniTypescriptHero.imports.organize')
- Fixed documentation drift in README.md, blog-post.md, and CLAUDE.md
- Removed false claims about 'blankLinesAfterImports: legacy' migration
- Corrected merging policy documentation (setting exists, not auto-configured)
- Verified syntax was already correct (audit false alarm on spread operator)
Documentation updates:
- README.md: Updated migration section to reflect actual behavior
(legacyMode: true for migrated users, not individual setting tweaks)
- blog-post.md: Simplified migration explanation to match implementation
- CLAUDE.md: Fixed configuration list (removed 'legacy' as enum value,
updated descriptions to match actual behavior)
Testing:
- All 202 tests passing with no regressions
- Command registration removal verified
- Migration behavior validated
Principle applied: Be polite to other extensions
- Only read old TypeScript Hero settings during one-time migration
- Never write to old namespace
- Never register commands in old namespace
- Let users manually update custom keybindings if needed
Code is now clean, consistent, and ready for release.
Copy file name to clipboardExpand all lines: README.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,12 +111,9 @@ Once your settings are migrated, you have two options:
111
111
112
112
If the old TypeScript Hero extension is still active, you'll see a reminder in the migration notification suggesting you can disable it.
113
113
114
-
**Blank Line Behavior:** For migrated users, `blankLinesAfterImports` is automatically set to `"legacy"` to preserve the original TypeScript Hero behavior. New users get `"one"` by default (ESLint standard: 1 blank line after imports). You can change this setting anytime in your configuration.
114
+
**Legacy Mode:** For migrated users, `legacyMode` is automatically set to `true` to preserve 100% of the original TypeScript Hero behavior (including blank line handling, within-group sorting, and no import merging). New users get `legacyMode: false` by default for modern best practices. You can change this setting anytime in your configuration.
115
115
116
-
**Import Merging Behavior:** The migration intelligently configures `mergeImportsFromSameModule` based on your old settings:
117
-
- If you had `disableImportRemovalOnOrganize: true`, merging is disabled (`false`) to preserve the exact old behavior
118
-
- If you had `disableImportRemovalOnOrganize: false` (or default), merging is enabled (`true`) as before
119
-
- This preserves 100% backward compatibility with your existing workflow
116
+
**Import Merging:** By default, `mergeImportsFromSameModule: true` combines duplicate imports from the same module (modern best practice). If you prefer to keep imports separate, set this to `false` in your configuration
Copy file name to clipboardExpand all lines: blog-post.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ If you're already using TypeScript Hero, switching is painless:
82
82
3. Your settings automatically migrate (one-time, on first startup)
83
83
4. Done.
84
84
85
-
All your custom configurations transfer automatically — quote style, semicolons, import grouping rules, blank line handling, everything. The extension preserves your exact behavior by intelligently migrating settings to match the old TypeScript Hero (like `blankLinesAfterImports: "legacy"` and `mergeImportsFromSameModule` based on your removal settings). You can switch to the new defaults anytime you want cleaner, more consistent spacing. You can even keep both extensions installed if you want, but I highly recommend deactivating the old hero because both will fight for the same shortcut. Speaking of which: the keyboard shortcut works exactly the same, `Ctrl+Alt+O` (or `Cmd+Alt+O` on macOS).
85
+
All your custom configurations transfer automatically — quote style, semicolons, import grouping rules, blank line handling, everything. The extension preserves your exact behavior by automatically enabling `legacyMode: true` for migrated users, which replicates 100% of the old TypeScript Hero behavior. You can switch to the new defaults anytime you want cleaner, more consistent spacing. You can even keep both extensions installed if you want, but I highly recommend deactivating the old hero because both will fight for the same shortcut. Speaking of which: the keyboard shortcut works exactly the same, `Ctrl+Alt+O` (or `Cmd+Alt+O` on macOS).
0 commit comments