refactor(apps, napi, tasks): remove noUnusedLocals from tsconfigs#20155
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
Pull request overview
Removes noUnusedLocals from various TypeScript project configs so unused locals are not surfaced by TypeScript tooling (e.g., VS Code) and are instead handled by Oxlint’s no-unused-vars, allowing underscore-prefixed unused values without editor noise.
Changes:
- Removed
noUnusedLocalsfrom multipletsconfig.json/tsconfig.node.jsonfiles across apps, napi packages, and tasks. - Simplified
apps/oxlint/src-js/visitor.test-d.tsby making the type assertions non-exported now that TS unused-local checks are disabled.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/e2e/tsconfig.json | Drops noUnusedLocals from the e2e task TS config. |
| napi/transform/tsconfig.json | Drops noUnusedLocals from the napi transform TS config. |
| napi/parser/tsconfig.node.json | Drops noUnusedLocals from the napi parser node TS config (and anything extending it). |
| napi/minify/tsconfig.json | Drops noUnusedLocals from the napi minify TS config. |
| apps/oxlint/tsconfig.json | Drops noUnusedLocals from oxlint app TS config. |
| apps/oxlint/src-js/visitor.test-d.ts | Removes unnecessary export from type-level assertions now that unused-locals checks are removed. |
| apps/oxfmt/tsconfig.json | Drops noUnusedLocals from oxfmt app TS config. |
Merge activity
|
…20155) Remove `noUnusedLocals` option from `tsconfig.json` files. It's redundant, as Oxlint `no-unused-vars` covers this for us. It's an annoyance to have `noUnusedLocals` enabled, as in VS Code TypeScript complains about unused vars, even if they're prefixed with `_`. Removing this option allows simplifying type tests added in #20066. Only reason these types had to be exported was to stop TS complaining that they were unused.
baf77df to
1606bd1
Compare
|
I added the config because it did not report unused properties in class context: |

Remove
noUnusedLocalsoption fromtsconfig.jsonfiles. It's redundant, as Oxlintno-unused-varscovers this for us.It's an annoyance to have
noUnusedLocalsenabled, as in VS Code TypeScript complains about unused vars, even if they're prefixed with_.Removing this option allows simplifying type tests added in #20066. Only reason these types had to be exported was to stop TS complaining that they were unused.