fix(migrate): auto-remove esModuleInterop: false from tsconfig.json#1148
fix(migrate): auto-remove esModuleInterop: false from tsconfig.json#1148
Conversation
|
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.
How to use the Graphite Merge QueueAdd 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. |
2630654 to
64c3b45
Compare
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.
64c3b45 to
1e072a4
Compare
rfcs/migration-command.md
Outdated
| - `"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 |
There was a problem hiding this comment.
Maybe rephrase this?
- oxlint's tsgolint hasn't remove it, typescript has?
There was a problem hiding this comment.
"esModuleInterop": false — This option has been removed by typescript. When present, vp lint --type-aware fails with: Option 'esModuleInterop=false' has been removed.
6734bd2 to
2f47f2d
Compare
Co-authored-by: Cameron <cameron.clark@hey.com> Signed-off-by: MK (fengmk2) <fengmk2@gmail.com>
2f47f2d to
e94c039
Compare

Closes #1145
When
vp migrateruns, it now scans all tsconfig*.json files andremoves
"esModuleInterop": falsewhich has been deprecated byoxlint's tsgolint and causes lint errors with type-aware checking.