Skip to content

fix(migrate): auto-remove esModuleInterop: false from tsconfig.json#1148

Draft
fengmk2 wants to merge 4 commits intobun-pmfrom
auto-remove-esModuleInterop-false-on-migrate
Draft

fix(migrate): auto-remove esModuleInterop: false from tsconfig.json#1148
fengmk2 wants to merge 4 commits intobun-pmfrom
auto-remove-esModuleInterop-false-on-migrate

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 26, 2026

Closes #1145

When vp migrate runs, it now scans all tsconfig*.json files and
removes "esModuleInterop": false which has been deprecated by
oxlint's tsgolint and causes lint errors with type-aware checking.

Copy link
Member Author

fengmk2 commented Mar 26, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 26, 2026
@fengmk2 fengmk2 force-pushed the auto-remove-esModuleInterop-false-on-migrate branch 2 times, most recently from 2630654 to 64c3b45 Compare March 26, 2026 06:36
fengmk2 added 2 commits March 26, 2026 14:48
Closes #1145

When `vp migrate` runs, it now scans all tsconfig*.json files and
removes `"esModuleInterop": false` which has been deprecated by
oxlint's tsgolint and causes lint errors with type-aware checking.

Uses jsonc-parser for JSONC-aware editing that correctly handles
inline comments, compact formatting, and trailing commas. Moved
jsonc-parser to dependencies temporarily until bundle refactoring
lands (#744).
Cover inline block comments, compact single-line JSON, compact
single-line JSONC, and last-property trailing comma. Use inline
snapshots to verify complete output correctness.
@fengmk2 fengmk2 force-pushed the auto-remove-esModuleInterop-false-on-migrate branch from 64c3b45 to 1e072a4 Compare March 26, 2026 06:58
Comment on lines +614 to +621
- `"esModuleInterop": false` — This option has been removed by oxlint's tsgolint. When present, `vp lint --type-aware` fails with: `Option 'esModuleInterop=false' has been removed.`

**Behavior**:

- Only `esModuleInterop: false` is removed — `true` is left alone
- Uses `jsonc-parser` for JSONC-aware editing that preserves comments and formatting
- Scans all `tsconfig*.json` variants (e.g., `tsconfig.json`, `tsconfig.app.json`, `tsconfig.node.json`)
- Runs automatically as part of the config rewrite phase — no user prompt needed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase this?

  • oxlint's tsgolint hasn't remove it, typescript has?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"esModuleInterop": false — This option has been removed by typescript. When present, vp lint --type-aware fails with: Option 'esModuleInterop=false' has been removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep sounds good

Co-authored-by: Cameron <cameron.clark@hey.com>
Signed-off-by: MK (fengmk2) <fengmk2@gmail.com>
@fengmk2 fengmk2 force-pushed the auto-remove-esModuleInterop-false-on-migrate branch from 2f47f2d to e94c039 Compare March 26, 2026 14:10
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.

2 participants