chore: type check tests via lint:tsc - #334
Merged
Merged
Conversation
cryptodev-2s
added this pull request to stack #331
September 9, 2026 20:40
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
The following preview build has been published: |
Mrtenz
previously approved these changes
Sep 10, 2026
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 09:32
2caaa71 to
2944d37
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 10:15
2944d37 to
6c941c7
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 10:28
6c941c7 to
5b0357e
Compare
cryptodev-2s
removed this pull request from stack #331
September 10, 2026 10:40
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 10:41
5b0357e to
4bb3dbb
Compare
cryptodev-2s
added this pull request to stack #335
September 10, 2026 10:41
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
The following preview build has been published: |
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 11:05
4bb3dbb to
30e7dd6
Compare
Mrtenz
previously approved these changes
Sep 10, 2026
stack merge was automatically disabled
September 10, 2026 11:16
Pull Request is not mergeable
stack merge was automatically disabled
September 10, 2026 11:20
Pull Request is not mergeable
stack merge was automatically disabled
September 10, 2026 11:35
Pull Request is not mergeable
stack merge was automatically disabled
September 10, 2026 11:51
Pull Request is not mergeable
stack merge was automatically disabled
September 10, 2026 12:14
Pull Request is not mergeable
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 12:46
30e7dd6 to
f5c48f4
Compare
stack merge was automatically disabled
September 10, 2026 13:00
Pull Request is not mergeable
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:03
f5c48f4 to
525ef27
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:08
525ef27 to
36992e5
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:15
36992e5 to
7030f20
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:21
7030f20 to
6864031
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:27
6864031 to
cc0baf4
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:33
cc0baf4 to
57e45b2
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:40
57e45b2 to
ac81167
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:50
ac81167 to
5426901
Compare
cryptodev-2s
force-pushed
the
migrate/typecheck-tests
branch
from
September 10, 2026 13:54
5426901 to
35af027
Compare
mcmire
reviewed
Sep 10, 2026
mcmire
reviewed
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Top of stack #331, on #333. Opts this package into the progressive test type checking rollout core is doing (16 of its 100 packages so far).
Tests were not type checked at all
Verified by injecting
const deliberateTypeError: number = "a string"into a test file:yarn buildtsconfig.build.jsonexcludes testsyarn test:sourceyarn test:types*.test-d.tsyarn linttest:sourcecan never catch it:isolatedModulesputs ts-jest on itstranspileModulepath, which erases types without checking them.The change
tsconfig.lint.jsonextendstsconfig.json(which already covers everything the build does not) and addsskipLibCheck, because dependency declarations do not satisfy the strict flags used here.Why
*.test-d.tsis excludedThose belong to
tsd, which checks them itself viayarn test:types(fixed in #322). Including them here pullstsd's own types into the program, and those reachtype-fest, whosebasic.d.tscarries/// <reference lib="esnext" />. That silently widens built in types past this package'slib, producing a spurious failure whereFrozenSetno longer satisfiesReadonlySetbecause of Set methods we do not target. Traced withtsc --explainFiles.Why this stacks on ES2022
With
lib: ES2020atscpass over the tests reports 11 errors, nearly allProperty 'cause' does not exist. Withlib: ES2022, zero. #333 has to land first.Confirmed not vacuous
A deliberate type error in a test file now exits non-zero with
TS2322, andtsdstill independently catches a badexpectAssignablein a.test-d.tsfile.Note
Low Risk
Dev-only lint and TypeScript config changes; no runtime or shipped library behavior changes.
Overview
yarn lintnow runs TypeScript on test and other non-build code through a newlint:tscscript, closing a gap wheretsconfig.build.jsonand transpile-only Jest never validated types in*.test.tsfiles.A new
tsconfig.lint.jsonextends the root config withskipLibCheck, incrementalemitDeclarationOnlyoutput under.tsc-lint-cache/(gitignored and ignored by ESLint), and an exclude for*.test-d.tssotsd-owned type tests are not double-checked or polluted bytsd’s widerlibtypes.Reviewed by Cursor Bugbot for commit 670fa8a. Bugbot is set up for automated code reviews on this repo. Configure here.