chore(core): clear dead-code biome warnings in packages/core#96
Open
lukaso-bot wants to merge 1 commit into
Open
chore(core): clear dead-code biome warnings in packages/core#96lukaso-bot wants to merge 1 commit into
lukaso-bot wants to merge 1 commit into
Conversation
Three gate-tolerated biome warnings, all behavior-preserving: - src/release-notes.ts: `!markdown || !markdown.trim()` → `!markdown?.trim()` (useOptionalChain). Semantically identical (verified equivalent on null/""/ whitespace); on the release-body sanitization surface where tolerated lint is worst. - test/find-release-bulk.test.ts: drop unused `makeGitlabProvider` import. - test/github.test.ts: drop a dead `const fetch` left over from an earlier draft; the rate-limit test uses the inline fetch passed to makeGithubClient. core biome: 3→0 warnings. Gate green: typecheck (4 pkgs), 256 core tests (incl. the touched rate-limit test by name), build, validate.sh. Co-Authored-By: Claude <noreply@anthropic.com>
lukaso-bot
commented
Jul 9, 2026
lukaso-bot
left a comment
Collaborator
Author
There was a problem hiding this comment.
In-house adversarial review (Copilot perpetually quota-blocked → in-house pass). Verified all three changes are behavior-preserving:
- release-notes.ts
!markdown || !markdown.trim()→!markdown?.trim(): equivalent.markdownis typedstring, so?.is a no-op for the declared type. At runtime it's also equivalent —null?.trim()/undefined?.trim()→undefined→ falsy → returnsnull, same as the old!markdownshort-circuit. The "Returns null for empty/whitespace" contract holds for""," ",null,undefined. This is the release-body sanitization surface, so good to have clean. - find-release-bulk.test.ts
makeGitlabProviderimport: appears only on the import line — not referenced in the file. Dead import. - github.test.ts
const fetch = queuedFetch(errResp(403,…)): that binding was never consumed —makeGithubClientis handed the inlinequeuedFetch(...)with the fullx-ratelimit-*headers. The 5xx test below keeps its ownfetch. The rate-limit test still assertsRateLimitErroron a 403-with-remaining=0 response, so coverage is intact.
Trivial dead-code/style cleanup. Cleared.
This was referenced Jul 9, 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.
What
Clears the three gate-tolerated biome warnings in
packages/core(the corecounterpart to #95, which did the same for
packages/web). Allbehavior-preserving.
Changes
src/release-notes.ts—!markdown || !markdown.trim()→!markdown?.trim()(useOptionalChain). Equivalent onnull/""/" ".release-notes.tsis the release-body sanitization surface, so a toleratedlint warning here is the worst place for one.
test/find-release-bulk.test.ts— drop unusedmakeGitlabProviderimport.test/github.test.ts— drop a deadconst fetch = queuedFetch(...)leftover from an earlier draft. The rate-limit test uses the inline fetch
passed to
makeGithubClient(with fullx-ratelimit-*headers); the line-342binding was never referenced.
Verification
pnpm --filter @released/core exec biome check: 3 → 0 warnings.pnpm -r build+pnpm -r typecheck: green (4 packages).pnpm -r test: green — 256 core / 45 cli / 220 web / 13 web-og.The touched rate-limit test run by name (
throws RateLimitError on 403 with remaining=0) passes, confirming the deleted binding was dead../scripts/validate.sh: green (shellcheck, actionlint, gitleaks, publint, osv).Trivial dead-code / style cleanup; no external-tool behavior to verify beyond
the linter + tests.