Skip to content

build(typescript): enable noUnusedLocals/noUnusedParameters repo-wide in the root tsconfig #9553

Description

@JSONbored

Context

Part of #9515. packages/loopover-mcp and packages/loopover-contract already enable noUnusedLocals/noUnusedParameters (the latter added in #9516, after five dead output-schema literals sat unreferenced in the stdio bin with nothing catching them). The root tsconfig.json — which covers src/**, test/**, and everything that imports across workspace boundaries — still doesn't.

The gap is not hypothetical: during #9518's admin-category migration, adminConfigScopeShape and adminGetConfigOutputSchema in src/mcp/server.ts were found already dead (orphaned by the #9517 pilot migration, silently) with nothing having caught it. A dry-run compile with both flags enabled repo-wide currently reports 491 violations (TS6133/TS6196/TS6198).

Requirements

  1. Enable noUnusedLocals and noUnusedParameters in the root tsconfig.json.
  2. Resolve all ~491 violations. Most are dead code (delete); some are intentionally-unused parameters in callback signatures that need an underscore prefix or a narrower fix — triage each, don't blanket-suppress.
  3. Where a genuinely-needed parameter must stay unused (an interface/callback signature contract), use the existing _-prefix convention already established elsewhere in the repo rather than disabling the check locally.
  4. Batch this in reviewable chunks by directory/subsystem if the volume warrants it — this issue may itself need splitting into a small number of PRs, following the same one-PR-per-issue discipline as the rest of the epic (open a sibling issue if a second PR turns out to be necessary; don't silently span issues).
  5. Full branch-counted patch coverage per house bar; typecheck and the full test suite must stay green throughout.

Non-goals

  • Any behavior change. This is dead-code removal and parameter-naming only.
  • Enabling additional strictness flags beyond these two.

Deliverables

  • noUnusedLocals + noUnusedParameters enabled in root tsconfig.json
  • All ~491 violations resolved (census of what was dead vs. renamed, recorded in the PR)
  • npm run typecheck clean

Expected outcome

The class of bug that let two admin-tool schemas rot unnoticed after #9517's migration becomes structurally impossible repo-wide, matching the guarantee packages/loopover-mcp and packages/loopover-contract already have.

References

Part of #9515. Independent of the other sub-issues — can run in parallel with any of them.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions