Skip to content

Eliminate any usage + enable strict type checking across the codebase #45

Description

@ComfyChloe

Goal

Eliminate any and as any usage across the codebase. Enable full TypeScript strict mode. Prevent new any from landing without an explicit override comment.

Scope

  • tsconfig: strict: true, noImplicitAny, strictNullChecks, noUncheckedIndexedAccess, exactOptionalPropertyTypes
  • ESLint rule @typescript-eslint/no-explicit-any: error with documented override for third-party type gaps
  • Pre-commit hook (Husky + lint-staged) that fails on any
  • For Electron renderer: enforce via the existing electron-vite build

Migration path

  1. Baseline: count current any per area (main/, renderer/, shared types)
  2. Module-by-module conversion, ship behind // @ts-expect-error TODO(strict) only when blocked by upstream types
  3. Replace @ts-expect-error only when upstream types land or a typed shim is added
  4. After zero any, enable noImplicitOverride, noFallthroughCasesInSwitch, useUnknownInCatchVariables

Acceptance

  • grep -r :\s*any --include=*.ts --include=*.vue returns 0 in main/, renderer/src/, and shared types
  • ESLint passes with --max-warnings 0

Effort: medium-to-large, ~1-2 weeks focused work.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions