Track the current Biome release - #546
Merged
Merged
Conversation
The pin sat at 2.4.9 while the rest of the organisation tracks latest. Because Biome runs with --error-on-warnings here, moving the pin alone turns CI red: 2.5.7 reports eleven findings that 2.4.9 did not. They are worth fixing rather than pinning away. noUnsafeOptionalChaining fired four times on the excluded-id sets. The Array.isArray guard already proves the value is an array, but the branch re-evaluated the optional chain, which the linter cannot narrow through. Hoisting each access into a local settles it; the cast stays, so inference and behaviour are unchanged. useOptionalChain fired seven times on !x || x.y !== "literal". Every subject is an object from a GraphQL or database result and every comparison is against a string literal, so x?.y covers the same inputs. biome.json is migrated to match what now runs: the declared schema had drifted, and linter.rules.recommended is deprecated in favour of preset and goes away in Biome 3.x. Closes #545
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 #545
Moves the Biome pin from
2.4.9tolatest(2.5.7 today), matching the rest of the organisation. Because Biome runs with--error-on-warningshere, the bump alone would turn CI red — 2.5.7 reports eleven findings 2.4.9 did not — so the fixes are included.noUnsafeOptionalChaining×4 (analytics.ts,attention.ts). TheArray.isArray(config?.x)guard already proves the value is an array, but the branch re-evaluatedconfig?.x, which the linter cannot narrow through. Each access is hoisted into a local; theas string[]cast stays, so inference and behaviour are unchanged.useOptionalChain×7. All!x || x.y !== "literal"→x?.y !== "literal". Every subject is an object from a GraphQL or database result and every comparison is against a string literal, so the two forms cover the same inputs.biome.jsonviabiome migrate --write: schema 2.4.9 → 2.5.7,linter.rules.recommended→preset(deprecated, removed in Biome 3.x).Verification
biome ci --error-on-warnings .at 2.5.7: exit 0,Checked 412 files, no findings, no notices. Before the change: exit 1 with 7 warnings, 4 correctness findings, 2 deprecation notices.pnpm run typecheck(tsc --noEmit): exit 0.