Skip to content

Strict type-safety checks have a sizable migration backlog #3729

Open

Description

@romanlutz

Is your feature request related to a problem? Please describe.

Several stricter frontend type-safety checks are not enabled, leaving a substantial measured migration backlog. This is a staged tooling proposal, not evidence that each diagnostic is a bug.

Describe the solution you'd like

Adopt stricter checks in stages, beginning with noUncheckedIndexedAccess or selected type-aware rules, and track/fix the baseline before expanding coverage.

Describe alternatives you've considered, if relevant.

Avoid enabling the full backlog at once. Preserve the existing clean exhaustive-deps rule.

Additional context

Measured candidate diagnostics: 89 for noUncheckedIndexedAccess, 203 for exactOptionalPropertyTypes, and 1,004 for strict-type-checked. Tested commit d3446e0, PyRIT 1.2.0.dev0, offline analysis. Evidence: files/evidence/round4/strict-eslint.json and flag outputs; local paths are not attachments.

Activity

  1. Kaap10 commented on Nov 5, 2026

    @Kaap10
    Contributor

    I would like to pick this up!

    As suggested in the proposal, I will scope this first PR strictly to Stage 1: enabling noUncheckedIndexedAccess in frontend/tsconfig.json and fixing the baseline ~89 diagnostics cleanly without expanding into the rest of the backlog.

  2. romanlutz commented on Nov 18, 2026

    @romanlutz
    ContributorAuthor

    Scope update: stage 1 is done — #3982 enabled noUncheckedIndexedAccess and cleared its baseline. This issue now tracks the remaining stages: exactOptionalPropertyTypes and the type-aware ESLint rules (strict-type-checked). The 203/1,004 diagnostic counts predate that work and the codebase has moved; re-measure on current main and propose one bounded stage per PR, as before.

  3. Kaap10 commented on Nov 19, 2026

    @Kaap10
    Contributor

    Thanks for the update Roman Lutz (@romanlutz)!

    I re-checked the latest main branch and measured the numbers:

    • The current baseline is clean (0 errors with noUncheckedIndexedAccess).
    • Enabling exactOptionalPropertyTypes currently gives 293 errors (mostly where undefined is passed to optional fields).

    I'm ready to take on Stage 2 (exactOptionalPropertyTypes).

    My plan for this PR is:

    1. Enable "exactOptionalPropertyTypes": true in frontend/tsconfig.json.
    2. Fix the 293 diagnostics across the frontend files cleanly.
    3. Keep this PR strictly focused on exactOptionalPropertyTypes (leaving ESLint rules for Stage 3).

    I will start working on this and raise the PR soon!

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

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions