Skip to content

How is "no implicit any" checked with strict off? #231

Closed

Description

@jtklein-agents

Question

The main-process spec required no implicit any on its files but left the compiler flag off and relied on review. For about 8,000 lines of page code, is that checked by a script in CI (for example a --noImplicitAny run filtered to converted files) or by review again?

Activity

  1. added
    wayfinder:grilling
    on Nov 16, 2026
  2. jtklein-agents commented on Nov 16, 2026

    @jtklein-agents
    OwnerAuthor

    Resolution

    Checked by a script in CI, plus two lint rules. Not by review alone.

    Measured on master at b0d2729: tsc --noImplicitAny reports 451 diagnostics against 26 without the flag. 440 of the extra ones are in the still-JavaScript in-scope files, 9 in JavaScript tests, and 2 in a TypeScript file. No .ts or .tsx production file contains a written any.

    Decisions

    • The rule: every .ts and .tsx file under src has zero diagnostics under --noImplicitAny. The file extension is the ratchet: a JavaScript file is exempt until its leaf renames it. No hand-kept list.
    • Where: a second tsc pass inside yarn typecheck:baseline (scripts/typecheck-baseline.js). One command, one CI step. tsconfig.json is unchanged; noImplicitAny stays off there.
    • No allowlist. The two existing slips are fixed in the leaf that adds the check. Both are in src/main/modelSelection.ts and share one cause: parse-filepath ships no types (TS7016, and a knock-on TS2345 at line 79). The fix is a module declaration, types only.
    • Written any is banned by lint: @typescript-eslint/no-explicit-any for all .ts and .tsx. It passes on every existing file today.
    • One lint rule set: the "full typing" block in .eslintrc.cjs (explicit-module-boundary-types, annotated catch) widens from src/main and src/common to all TypeScript under src. The same leaf fixes the 4 existing violations, in src/app/components/CodeHighlight.tsx, ErrorBoundary.tsx (2) and ModifiedDialog.tsx.
    • When: its own leaf, landing before any conversion leaf.

    For the spec: this leaf amends the Checks section of docs/agents/issue-tracker.md and the lint comment that names the main-process spec.

    Left to the slicing ticket: lodash and d3-array ship no types (see the inventory), so the first converted file importing either will fail the new check with TS7016. Which leaf adds their types, and whether as @types/* packages or module declarations, is not decided here.

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

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions