Skip to content

No-implicit-any check and lint rules for all TypeScript #237

Closed

Description

@jtklein-agents

Parent

Part of #236.

PR base

Open the pull request against spec/236-page-typescript (cut from master), not master. When that branch is missing, create it from origin/master and push it first.

What to build

CI fails on any implicit any in a TypeScript file under the source tree, and lint rejects a written any there. The check is a second tsc --noImplicitAny pass inside the existing yarn typecheck:baseline command: one command, one CI step, no allowlist and no hand-kept file list. The file extension is the ratchet, so a JavaScript file is exempt until its own leaf renames it. The baseline mechanism stays and learns to pass on an empty baseline file.

Acceptance criteria

  • yarn typecheck:baseline runs a second pass and fails when any .ts or .tsx file under the source tree has a diagnostic under --noImplicitAny; JavaScript files are exempt
  • The second pass has no allowlist and no list of files
  • The baseline check passes when the baseline file is empty, with no placeholder line
  • The two existing slips, both in the main-process model-selection module and both caused by parse-filepath shipping no types, are fixed by a types-only module declaration
  • @typescript-eslint/no-explicit-any applies to all TypeScript under the source tree
  • The "full typing" lint rule block (explicit module boundary types, annotated catch) covers all TypeScript under the source tree, not only the main process and shared folder; the lint comment that names the main-process spec is amended
  • The four existing violations of that block in the already-TypeScript page components are fixed
  • New Jest cases beside the existing baseline helper test cover the second pass and the empty-baseline case
  • The Checks section of the tracker conventions describes the second pass and the empty-baseline rule
  • yarn lint, yarn typecheck:baseline and yarn react-test pass; tsconfig.json is unchanged (strict and noImplicitAny off, allowJs on)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions