Skip to content

chore(app): enable noUnusedLocals - #52856

Merged
kitlangton merged 1 commit into
v2from
unused-locals-app
Oct 2, 2026
Merged

kitlangton merged 1 commit into
v2from
unused-locals-app

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Why

Every package tsconfig extends @tsconfig/bun, which defaults noUnusedLocals to false. Nobody turned it off deliberately, so unused code in app went undetected. This turns the flag on for app (and its e2e config, which extends it) and removes the 26 unused locals it finds.

What Changes

  • packages/app/tsconfig.json: "noUnusedLocals": true
  • settings/general/general.tsx: deletes the dead AppearanceSection and NotificationsSection components and their helpers (FontSetting, fontSettings, schemeOptions, plus imports). feat(app): redesign non-modal settings #40845 moved both sections to their own settings pages and stopped rendering these; the old code stayed behind.
  • shell/notifications/notification.tsx: 10 unused imports.
  • shell/tabs/tabs.tsx: unused useParams() call and import (read-only router access).
  • Single unused imports in composer/editor/editor.tsx, providers/connect/dialog.tsx, shell/commands/palette.ts, shell/titlebar/tab-nav.tsx.
  • e2e (checked by typecheck:e2e, which extends app's config): 3 unused imports, and an unused timeline binding in scroll-interaction.spec.ts. The setupTimeline(...) call is kept.

No behavior changes.

Scope

Part of a series enabling noUnusedLocals per package (#52849, #52850). typecheck:e2e still reports two existing TS2345 errors (terminals/probe.ts, session-timeline-stream-probe.ts) that are on v2 already and unrelated.

Verification

cd packages/app && bun typecheck
bun run typecheck:e2e     # only the 2 pre-existing TS2345 errors remain
bun run test:unit
bun run check             # git hooks

Typecheck clean; 728 unit tests pass, 0 fail.

@kitlangton
kitlangton enabled auto-merge (squash) October 2, 2026 22:29
@kitlangton
kitlangton merged commit cf7fcfa into v2 Oct 2, 2026
11 checks passed
@kitlangton
kitlangton deleted the unused-locals-app branch October 2, 2026 22:44
Ichinose-Kazuki pushed a commit to Ichinose-Kazuki/opencode that referenced this pull request Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant