Skip to content

refactor(apps, napi, tasks): remove noUnusedLocals from tsconfigs#20155

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-06-refactor_apps_napi_tasks_remove_nounusedlocals_from_tsconfigs
Mar 9, 2026
Merged

refactor(apps, napi, tasks): remove noUnusedLocals from tsconfigs#20155
graphite-app[bot] merged 1 commit intomainfrom
om/03-06-refactor_apps_napi_tasks_remove_nounusedlocals_from_tsconfigs

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 9, 2026

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.

Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter A-parser Area - Parser A-cli Area - CLI A-minifier Area - Minifier A-transformer Area - Transformer / Transpiler A-formatter Area - Formatter A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Mar 9, 2026
@overlookmotel overlookmotel marked this pull request as ready for review March 9, 2026 12:58
@overlookmotel overlookmotel requested a review from camc314 as a code owner March 9, 2026 12:58
Copilot AI review requested due to automatic review settings March 9, 2026 12:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 noUnusedLocals from multiple tsconfig.json / tsconfig.node.json files across apps, napi packages, and tasks.
  • Simplified apps/oxlint/src-js/visitor.test-d.ts by 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.

@overlookmotel overlookmotel self-assigned this Mar 9, 2026
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Mar 9, 2026
Copy link
Member Author

overlookmotel commented Mar 9, 2026

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.
@graphite-app graphite-app bot force-pushed the om/03-06-refactor_apps_napi_tasks_remove_nounusedlocals_from_tsconfigs branch from baf77df to 1606bd1 Compare March 9, 2026 13:42
@graphite-app graphite-app bot merged commit 1606bd1 into main Mar 9, 2026
19 checks passed
@graphite-app graphite-app bot deleted the om/03-06-refactor_apps_napi_tasks_remove_nounusedlocals_from_tsconfigs branch March 9, 2026 13:53
@Sysix
Copy link
Member

Sysix commented Mar 9, 2026

I added the config because it did not report unused properties in class context:
https://github.com/oxc-project/oxc/pull/17541/changes 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-cli Area - CLI A-formatter Area - Formatter A-linter Area - Linter A-linter-plugins Area - Linter JS plugins A-minifier Area - Minifier A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants