Skip to content

build: lint pays for type information but no rule uses it #892

Open

Description

@bpowers

Every package's ESLint config sets parserOptions.project, which makes the TypeScript parser build a full type-checked program for each lint run.
None of the rules we enable use type information: the shared config spreads only eslint.configs.recommended and tseslint.configs.recommended, and all 19 @typescript-eslint rules that turns on are syntactic.
We pay for type information and use none of it.

Why it matters

Measured with eslint --no-cache, parserOptions.project costs about 30% of lint time in src/diagram (2.9s vs 2.0s) and about 24% in src/core.
The pre-commit hook lints every package, so this is paid on every commit.

Fix

Pick one end state:

  1. Recommended: keep project and turn on the type-aware rules that justify it, starting with the promise-safety rules in build: enable typescript-eslint promise-safety rules #894, which would flag about 20 real defects today.
  2. Alternative: drop project and take the time back.
    Not a one-line change: it first needs build: no-undef runs on TypeScript files and breaks if lint config changes #893 (otherwise 383 spurious no-undef errors appear in src/diagram), and src/app and src/diagram point project at two tsconfigs each.

Pointers

Activity

  1. added
    hygiene
    javascript
    on Jul 8, 2026
  2. added
    ci
    on Oct 12, 2026
  3. changed the title [-]build: eslint builds a full TypeScript Program (parserOptions.project) but enables zero type-aware rules[/-] [+]build: lint pays for type information but no rule uses it[/+] on Oct 12, 2026
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

    cihygienejavascripttech debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions