Conversation
|
Checkpoint for #4683. Flips the root tsconfig to `strict: true` and removes the four flags the umbrella now subsumes: * `noImplicitAny: false` and `strictNullChecks: false` — the load-bearing removals. An individually-set flag wins over the `strict` umbrella, so adding `strict: true` while these are present is a no-op. * `noImplicitThis: true` and `alwaysStrict: true` — redundant once `strict` is on. Verified no-ops: the same 351 errors byte-for-byte, and identical JS + .d.ts emit across all 214 output files, with and without them. `noImplicitReturns` and `noUnusedLocals` stay — they are not part of the strict family. No source changes. This is intentionally left failing so the whole surface is visible in CI rather than estimated. eddeee888:oss:issue-verify Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HcWBL7VGPvQGV2Rbc8fXVm
eddeee888
force-pushed
the
claude/trusting-tesla-3vg6x1
branch
from
September 20, 2026 06:22
31e8a72 to
7cc512a
Compare
This branch has not been deployed
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.
Description
Checkpoint PR for #4683 (
Consider using strict: true compiler option). It is intentionally red — it changes no source, it just turns the flag on so the real failure surface is visible in CI instead of estimated.Related #4683
The whole diff is
tsconfig.json:strict: truein, and the four flags the umbrella now subsumes out.noImplicitAny: false/strictNullChecks: falseis the load-bearing part. An individually-set flag beats thestrictumbrella, so adding"strict": truewhile those two are still present is a no-op —tsc --noEmit --strictreports 0 errors onmastertoday, which is misleading.noImplicitThisandalwaysStrictare removed as redundant, not as a behaviour change. Verified no-ops from three angles: the same 351 errors byte-for-byte, and identical JS and.d.tsemit across all 214 output files, with and without them.noImplicitReturnsandnoUnusedLocalsstay — they are not part of the strict family.Type of change
Not breaking as committed (no source change), but see Further comments — the published
.d.tsshifts once this is actually adopted.How Has This Been Tested?
pnpm@11.24.0,typescript@6.0.3, Node 22, Linux.masterpnpm types:checkpnpm buildpnpm vitest runtsc -p tsconfig.spec.jsonTwo things worth flagging about that table:
types:checkis not wired into any workflow. CI goes red here only becausepnpm buildrunstsc. Wiringtypes:checkintopr.ymlis probably worth doing on its own, but it would widen this PR, so it is not included.tsconfig.spec.jsonis never checked bypnpm types:check—tsc --noEmitdoesn't build project references. Its 55 errors onmasterare mostly missing test-fixture modules, i.e. it isn't a maintained gate today. The jump to 576 is real but should be scoped separately from the 351.Where the 351 errors live
visitor-plugin-commongraphql-codegen-cliplugin-helperstypescriptfragment-matchertypescript-operationsclient-presettyped-document-nodegraphql-modules-presettestingcoredocument-nodes,time,resolvers,addWorst files:
base-types-visitor.ts(57),base-resolvers-visitor.ts(47),selection-set-to-object.ts(31),utils.ts(19),client-side-base-visitor.ts(17).By error code:
TS2345102,TS232262,TS1804840,TS700636,TS278333, then a long tail.Which flags actually cost anything
Measured one at a time against
master:strictNullChecksnoImplicitAnystrictPropertyInitializationstrictFunctionTypesstrictBindCallApplyuseUnknownInCatchVariablesnoImplicitThisandalwaysStrictwere already on. So three of the eight sub-flags are free — enablingstrictFunctionTypes,strictBindCallApplyanduseUnknownInCatchVariablestogether produces 0 errors and a byte-identical.d.tsemit. That is a separate, safe, mergeable PR and does not need any of the work below.Further comments
Two things make the remaining 351 more than a mechanical cleanup:
1. The published
.d.tschanges. Emitting declarations both ways and diffing gives 9 changed files, ~50 lines, invisitor-plugin-common,cli,client-presetandtesting:any → nullon a protected field andany[] → never[]break subclasses outright, andvisitor-plugin-commonis the base-class package community plugins extend. That is the naive diff with the 351 errors unfixed, so it is indicative rather than final — but the shape is a type-level breaking change for downstream plugin authors.2. Some fixes are behaviour decisions, not annotations. The 33
TS2783s are allsuper({ ...defaults, ...additionalConfig })inbase-resolvers-visitor.ts:758-795, where the spread order deliberately lets plugin config win; "fixing" it means retypingadditionalConfigas partial or reordering, and reordering changes behaviour. Likewise each of the 40TS18048"possibly undefined" sites on a config read forces a choice of default — and those defaults decide generated output, guarded only by snapshot tests.Suggested sequencing: (a) land the three free flags, (b) decide a progressive mechanism — there is one root
tsconfig.jsoncovering all ofpackages, so there is nowhere for per-package opt-in to land today, (c) batchstrictNullChecks/noImplicitAnyinto a major with a migration note.Checklist
I have added tests that prove my fix is effective— n/a, this PR proves a failure, it doesn't fix oneMy changes generate no new warnings— it generates 351 errors, deliberatelytscis not)No changeset: nothing here is publishable.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HcWBL7VGPvQGV2Rbc8fXVm