Clear the two Biome warnings in scripts/ - #64
Merged
Stwissel merged 1 commit intoAug 24, 2026
Conversation
npx biome check . now reports zero warnings and zero errors.
check-dependencies.mjs takes the optional-chain form. Your equivalence argument
holds and I checked it rather than took it: `??` substitutes only for null and
undefined, `?.` short-circuits on exactly those two, and for any other type the
index lookup yields undefined either way. allowedDev comes from
dependency-policy.json, so it is an object or absent. The unsafe flag is about
the rule not knowing that in general, not about this call site.
check-npmrc.mjs loses the directive and keeps the prose, as asked. I moved your
finding into the comment as well -- that noTemplateCurlyInString does not
inspect regex literals, which is why the suppression never fired -- together
with the caveat that it becomes necessary again if ENV_REFERENCE is ever
rewritten as a string. Without that, the next reader sees a bare comment about
npmrc syntax and no reason the suppression is absent.
Verified:
npx biome check . zero warnings, zero errors
node scripts/check-dependencies.mjs ok (6 manifests), exit 0
node scripts/check-npmrc.mjs exit 1 on a literal token, exit 0 on ${VAR}
npm run verify exit 0 (127 tests, typecheck clean)
The npmrc guard was demonstrated failing rather than presumed to fail, per L8:
.npmrc contains a credential that is not an environment reference:
line 1: value must be exactly ${VARIABLE}
//registry.npmjs.org/:_authToken=<redacted>
One note for anyone reproducing on Windows: without core.autocrlf=false, Biome
reports every file in scripts/ as a formatting error, because the working copy
is CRLF and the index is LF. That is a local checkout artefact, not a repo
state -- both blobs here are committed LF.
The remaining `biome migrate` info is pre-existing and untouched.
Closes beyonddemise#60
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #60.
npx biome check .reports zero warnings and zero errors.1.
check-dependencies.mjs— optional chainYour equivalence argument holds, and I checked it rather than took it on trust:
??substitutes only fornull/undefined,?.short-circuits on exactly those two, and for any other type the index lookup yieldsundefinedeither way.allowedDevis read fromdependency-policy.json, so it is an object or absent. The unsafe flag is Biome not knowing that in general — it is not a doubt about this call site.2.
check-npmrc.mjs— dead suppressionDirective gone, prose kept. I also folded your finding into the comment:
Without that second half, the next reader sees a comment about
.npmrcsyntax and no reason the suppression is absent — and your caveat about the string rewrite is exactly the thing that would otherwise have to be rediscovered.Done when
npx biome check .reports zero warnings and zero errorsscripts/check-dependencies.mjsuses the optional-chain form, and still passes on the current treebiome-ignoreis gone and the prose explanation is retainednode scripts/check-npmrc.mjsstill fails on a literal tokennpm run verifyexits 0The guard demonstrated failing rather than presumed to, per L8:
and the accepting case, so the exit 1 above is not a gate that rejects everything:
The repository's own
.npmrcwas restored afterwards, byte for byte.npm run verify: exit 0 — deps ok (6 manifests), npmrc ok, biome clean,tsc --buildclean, 127 tests passing.One note for anyone reproducing on Windows
Without
core.autocrlf=false, Biome reports every file inscripts/as a formatting error before any change is made — the working copy is CRLF and the index is LF. It is a local checkout artefact, not a repo state, but it buries the two real warnings completely. Both blobs in this PR are committed LF (git ls-files --eolconfirmsi/lf w/lf).The remaining
biome migrateinfo is pre-existing and untouched — the issue asks for zero warnings and zero errors, and I read that as leaving the info alone rather than pulling a config migration into this PR. Say the word if you want it here instead.