Repository navigation
refactor(npm): drop void operator from type checks - #1382
Merged
Merged
Conversation
Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
BryanFRD
enabled auto-merge (squash)
November 9, 2026 15:36
Contributor
There was a problem hiding this comment.
Approve. The change replaces void expr with console.log(expr) in the type fixture npm/types-check.ts, and both checks stay meaningful.
Review
consoleresolves through the default DOM lib used by the CItsccall, and the hook still returnsvoid, so it fitsHookFunction.ctx.nopeis still an unknown-property error, so the@ts-expect-errordirective remains satisfied.tscwas not run locally (npxis unavailable in the runner), so this rests on reading the types.
Suggestions
npm/types-check.ts:3(suggestion):console.log(ctx.newVersion)only checks that the property exists, and Sonar may flag console usage in turn. A typed binding pinsnewVersiontostringand makes the positive check stronger:
postTag: (ctx) => { const version: string = ctx.newVersion; console.log(version); }
Formal verification
| Property | Result |
|---|---|
| none applicable | nothing to prove |
The only changed file is a compile-time type fixture with no runtime logic, so no harnesses were written. By reading only (no TypeScript compiler in the image), console.log returns void, which fits HookFunction = (ctx: HookContext) => void | Promise<void> (npm/types/hook-context.d.ts:38).
ferrflow Bot
added a commit
that referenced
this pull request
Nov 9, 2026
## [7.35.6] - 2026-11-09 ### Refactoring - refactor(npm): drop void operator from type checks (#1382)
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.
Sonar quick win: typescript:S3735 (two occurrences in npm/types-check.ts). The hook bodies now read the context field through console.log; the npm types check still passes.
Skipped:
False positive: