Skip to content

fix: clean unused import autofix whitespace - #1099

Merged
fireairforce merged 1 commit into
mainfrom
zoomdong/issue-1095-unused-import-whitespace
Aug 26, 2026
Merged

fix: clean unused import autofix whitespace#1099
fireairforce merged 1 commit into
mainfrom
zoomdong/issue-1095-unused-import-whitespace

Conversation

@fireairforce

Copy link
Copy Markdown
Member

Summary

  • remove horizontal whitespace when an entire unused import declaration is deleted while preserving its newline structure
  • retain comments without recreating whitespace-only lines, including leading, trailing, block, and line-comment cases
  • clean adjacent horizontal spacing in partial import fixes without disturbing used specifiers or comma placement
  • add autofix snapshots for default, named, namespace, type-only, multiline, and comment-adjacent imports
  • verify a second fix pass is a no-op

Parser audit

  • linted original and fixed JavaScript/TypeScript fixtures with explicit parse assertions
  • snapshot validation reparses every fixed output
  • no Yuku parser regression observed with v0.9.1

Testing

  • zig build test --summary all — 1957/1957 tests passed; 11/11 rule snapshots passed
  • zig build
  • git diff --check

Closes #1095

@codspeed-hq

codspeed-hq Bot commented Aug 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 1 untouched benchmark


Comparing zoomdong/issue-1095-unused-import-whitespace (341e871) with main (ab5c509)

Open in CodSpeed

@fireairforce
fireairforce merged commit 4aa8f8b into main Aug 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove whitespace left by unused-import autofix

1 participant