chore: enable strict mode in demos/freelance-escrow's tsconfig - #103
Merged
collinsezedike merged 1 commit intoAug 19, 2026
Merged
Conversation
The app tsconfig only enabled noUnusedLocals/noUnusedParameters/ noFallthroughCasesInSwitch explicitly, leaving strictNullChecks, noImplicitAny, and the rest of the strict family off by default. The code happens to be well-typed, so flipping strict on surfaces no errors; it just makes the compiler actually enforce it going forward. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
collinsezedike
approved these changes
Aug 19, 2026
collinsezedike
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution, feel free to pick up another open issue.
Collaborator
|
Hey @ZuLu0890, really solid work on this one. The PR write-up was thorough, verification steps, risk assessment, and the out-of-scope notes all made it an easy review. This is also one of the few PRs here that's passed on a single review round. Hope you stick around, there's more open issues if you're interested in taking on another. |
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.
Summary
Closes #95
demos/freelance-escrow/tsconfig.app.jsonwas not running TypeScript in strict mode. Only three lint-oriented flags were enabled explicitly —noUnusedLocals,noUnusedParameters, andnoFallthroughCasesInSwitch— while the entire strict family (strictNullChecks,noImplicitAny,strictFunctionTypes,strictPropertyInitialization, etc.) was left at its default of off. The demo app's code happened to be well-typed, so nothing looked wrong day-to-day, but the compiler was not actually enforcing it: a regression that introduced anullleak, an implicitany, or a misusedthiswould have sailed throughpnpm buildand CI undetected.This PR adds a single line —
"strict": true— totsconfig.app.json'scompilerOptions. It is a type-checking tightening only: no source files changed, no runtime behavior changed, and no emitted JavaScript is affected.The change
"moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", + "strict": true, /* Linting */ "noUnusedLocals": true,One file touched, one line added. The diff is intentionally minimal and scoped exactly to what the issue asks for.
What
strict: trueactually turns onstrictis a meta-flag that enables the entire strict family. Confirmed viatsc --showConfig -p tsconfig.app.json, the app project's effective compiler options now include:noImplicitAnyanytypenoImplicitThisthisexpressions with an implicitanytypestrictNullChecksnull/undefinedexplicit in the type systemstrictFunctionTypesstrictBindCallApplybind/call/applyagainst the target signaturestrictPropertyInitializationstrictBuiltinIteratorReturnIterator/Generatorreturnvalues strictlyalwaysStrict"use strict"and parses in strict modeuseUnknownInCatchVariablescatchvariables asunknownThe demo's previously-explicit
noUnusedLocals/noUnusedParameters/noFallthroughCasesInSwitchremain in place and are unaffected.Why no code changes were needed
The issue's proposed approach anticipated this: "the existing code already reads as well-typed; if it turns out to be large, say so in the PR rather than working around it." The code was indeed genuinely well-typed:
tsc -b— after deletingnode_modules/.tmp/*.tsbuildinfoto rule out incremental-cache false positives — surfaced zero errors across all 20 source files undersrc/.@ts-expect-errorsuppressions,// @ts-ignorecomments, oranycasts added anywhere. The PR is purely the config flip.Verification
All checks were run locally, mirroring the
demojob in.github/workflows/ci.ymlexactly (build the SDK first, install with a frozen lockfile, then lint and build):packages/tholos-sdkwas built first (pnpm install --frozen-lockfile && pnpm build), producing thedist/thatdemos/freelance-escrow'sfile:../../packages/tholos-sdkdependency requires to resolve.pnpm install --frozen-lockfileindemos/freelance-escrow(no lockfile changes).pnpm build(tsc -b && vite build) ✅ passes from a clean state (deleted.tsbuildinfofirst).vite buildtransformed 248 modules and emitted the production bundle successfully.pnpm lint(oxlint) ✅ 0 warnings, 0 errors across 19 files.tsc --showConfig -p tsconfig.app.jsonconfirms"strict": trueand the full strict family (strictNullChecks,noImplicitAny, …) are active.Test plan checklist
pnpm buildpasses from a clean typecheck statepnpm lintpasses (0 warnings, 0 errors)tsc --showConfigconfirmsstrictand the strict family are activeOut of scope (deliberately not changed)
tsconfig.node.jsoncovers onlyvite.config.ts(a 6-line config file). The issue scopes this work totsconfig.app.json; extending strict mode to the node-side config would be a reasonable follow-up but is intentionally left out of this PR to keep it to the stated scope. Happy to do it in a separate PR if desired.packages/tholos-sdkand the Rustcontracts//tools/crates are untouched. This is a demo-app-only change.demos/today, so there's nothing else to align.Risk assessment
strictis a compile-time-only flag; no source files changed, so the emitted bundle is unchanged.any,nullleaks, etc.) will be caught at build time rather than in production.demojob steps all pass; the PR's CI run is expected to go green.Related