Skip to content

TypeScript type annotations: resolve tsconfig.json extends inheritance #486

@aviavraham

Description

@aviavraham

Description

The TypeAnnotationsAssessor checks each tsconfig.json for compilerOptions.strict directly, but does not resolve the extends field. Leaf configs that inherit strict: true from a base config (e.g., tsconfig.base.json or a shared package like @tsconfig/node20) are incorrectly treated as non-strict.

Example

// tsconfig.base.json
{ "compilerOptions": { "strict": true } }

// packages/app/tsconfig.json — inherits strict but scores as non-strict today
{ "extends": "../../tsconfig.base.json" }

Scope

  • Resolve relative extends paths
  • Handle node-style package references (e.g., @tsconfig/node20/tsconfig.json)
  • Merge parent compilerOptions into child
  • Detect and prevent circular extends
  • Add unit tests for inherited strict

Context

Identified during code review of #485. Deferred as out of scope for that PR which focused on JSONC parsing (#383) and monorepo discovery (#431).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions