Conversation
Two of the three strict flags WXT 0.21's generated tsconfig introduced. Both are cheap enough to take now, which leaves #688 as a single question about noUncheckedIndexedAccess rather than three tangled ones. Measured cost, deduplicated across packages (cli/server/extension all typecheck core via `paths`, so raw per-package counts double-count): noFallthroughCasesInSwitch 0 sites noImplicitOverride 5 sites, 3 files, all core/src noUncheckedIndexedAccess 55 sites (+145 more in core/test) So this change is the two free ones. The five `override` annotations are genuinely correct documentation, not appeasement — every one is a real override of a base-class member, and events.ts even carried an "Override emit to also trigger wildcard listeners" comment saying so while lacking the keyword. Enabled per package because there is no shared base tsconfig; introducing one is a larger refactor than this warrants. The extension keeps only its noUncheckedIndexedAccess opt-out. Verified both flags actually bite rather than being inert config: removing one `override` keyword produces TS4114, and a deliberate switch fallthrough produces TS7029. Full `pnpm run check` green (typecheck, schema drift, 1600 tests) plus the node 24 release build. Refs #688.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Enables noImplicitOverride and noFallthroughCasesInSwitch across the repository.
Changes:
- Updates TypeScript configurations across packages.
- Removes obsolete extension opt-outs.
- Adds five required
overrideannotations in core.
File summaries
| File | Summary |
|---|---|
packages/server/tsconfig.json |
Enables strict compiler flags. |
packages/extension/tsconfig.json |
Aligns extension configuration with the adopted flags. |
packages/core/tsconfig.json |
Enables strict compiler flags. |
packages/core/src/loggers/metricsCollector.ts |
Marks logger lifecycle methods as overrides. |
packages/core/src/loggers/filter.ts |
Marks logger lifecycle methods as overrides. |
packages/core/src/events.ts |
Marks emit as an override. |
packages/cli/tsconfig.json |
Enables strict compiler flags. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Takes two of the three strict flags WXT 0.21 introduced, so that #688 becomes a single question about
noUncheckedIndexedAccessinstead of three tangled ones. Refs #688 (does not close it).Why these two and not the third
I measured each flag separately, deduplicated across packages (cli/server/extension all typecheck core via
paths, so raw per-package counts double-count):noFallthroughCasesInSwitchnoImplicitOverridecore/srcnoUncheckedIndexedAccesscore/testThis PR is the two free ones. The
noUncheckedIndexedAccessbreakdown is 21extension/test, 14core/src, 10cli/test, 9extension/src, 1extension/e2e— 31 of 55 in tests, where the flag buys close to nothing.The five
overrideannotations are realNot appeasement — each is a genuine override of a base-class member:
core/src/events.ts:547—emitoverEventEmitter.emit. This one already had an"Override emit to also trigger wildcard listeners"doc comment while lacking the keyword.core/src/loggers/filter.ts—initialize,disposeoverLoggerWrappercore/src/loggers/metricsCollector.ts—initialize,disposeoverLoggerWrapperVerification
I checked the flags actually bite rather than sitting inert in config:
Both probes reverted; tree clean. Also green: full
pnpm run check(typecheck across all packages, schema drift gate, 1600 tests) andpnpm run build+ CLI startup on node 24.Note on placement
Enabled in each package's tsconfig because there's no shared base config — core/cli/server are standalone and the extension extends WXT's generated one. Introducing a shared base is a bigger refactor than this warrants, but it does mean four files to touch for the next flag.
What's left on #688
Only
noUncheckedIndexedAccess. My read, from having now read all 24 production sites across two audit passes: zero are real bugs, so the case for it is forward-looking (catching future unguarded indexing) rather than remedial. Worth deciding on those terms. Also surfaced while measuring:core/tsconfig.jsonexcludes**/*.test.ts, so core's 993 tests are never typechecked by anything — clean at baseline today, but that's where 145 of the 200 sites live.