fix(lint): clear the pre-existing Biome errors so the lint gate reflects PR content - #311
Open
vishkaty wants to merge 1 commit into
Open
fix(lint): clear the pre-existing Biome errors so the lint gate reflects PR content#311vishkaty wants to merge 1 commit into
vishkaty wants to merge 1 commit into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
vishkaty
force-pushed
the
clear-biome-lint-debt
branch
2 times, most recently
from
August 3, 2026 18:13
023a972 to
46be4a5
Compare
vishkaty
force-pushed
the
clear-biome-lint-debt
branch
from
August 3, 2026 19:38
46be4a5 to
dbe406a
Compare
…cts PR content The Lint Code Base workflow runs Biome across the workspace, so any pull request that touches a Biome relevant file inherits 65 preexisting errors from main and fails regardless of its own content. Observed on main at e1ea56d: npx @biomejs/biome@2 lint code/web-client/src docs/assets reports 65 errors and 10 warnings. Expected: a lint gate that only fails on problems introduced by the pull request itself. This change clears every error while keeping behavior intact. docs/assets diagrams: each SVG gains a meaningful title element as the first child of the svg root (noSvgWithoutTitle), and the optional SVG 1.0 DTD prologue is removed from the ten generated diagrams because the Biome parser cannot read it and the declaration is obsolete for SVG. All files remain well formed XML. web client: decorative inline icons are marked aria hidden (noSvgWithoutTitle), all nine plain buttons declare a button type (useButtonType), the inventory item row becomes a real button element with user agent styles neutralized in the stylesheet (useSemanticElements), disclosure rows key off the disclosure salt instead of the array index (noArrayIndexKey), and the three hook dependency findings are resolved: sendToAgent now lists fetchMandate, which is a stable useCallback, the auto poll effect lists the qty field it reads, and the scroll effect in App now reads chatState.messages.length so the dependency is genuine. The unused import, variable and parameter in mandateEntries.ts are removed or underscore prefixed; these also blocked npm run build via tsc on main, which now passes. Spelling: the generated diagram SVGs contain Raphael library object ids, so docs/assets/*.svg joins the cspell ignore list, and the preexisting code words dedup and sublabel join custom-words.txt. Verification: the same Biome command now reports zero errors, with seven preexisting warnings and two infos remaining, all stylistic. A full workspace Biome run reports zero errors, npm run build succeeds, and cspell reports zero issues on every changed file. No Python files are touched.
vishkaty
force-pushed
the
clear-biome-lint-debt
branch
from
August 3, 2026 19:41
dbe406a to
8a53207
Compare
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
The Lint Code Base check currently goes red on any PR that touches a Biome relevant file type, because Super Linter runs Biome across the workspace and main carries dozens of pre existing Biome errors (a clean checkout of e1ea56d reports 65 errors from
npx @biomejs/biome@2 lint code/web-client/src docs/assets, and the CI Biome reports more because its severity mapping is stricter). PRs touching only Python skip Biome and look green, so the gate reflects which file types a PR touches rather than its content. Offered in a comment on #307; this change clears the debt so the gate becomes meaningful for every contributor.Changes, grouped
13 docs/assets SVGs: a
titleelement added as the first child ofsvg(text derived from the filename), fixingnoSvgWithoutTitle. The 10 generated diagrams also had their obsolete SVG 1.0 DOCTYPE and XML declaration prologues removed; the CI Biome parser rejects both (all its parse errors are at 1:1 on these files), and neither affects how browsers or GitHub render the images. All 13 files re validated as well formed XML.Web client, semantics preserved throughout:
type="button"on 9 non submitting buttons (the client contains no form element);aria-hidden="true"on 8 decorative inline icons; onediv role="button"converted to a real button with user agent styles neutralized in the stylesheet; one list key switched from array index to the per disclosure salt; two string concatenations converted to template literals;Number.isNaNon an already numeric value; optional chaining in two conditionals; the root element non null assertion replaced with an explicit check; two guarded non null assertions replaced with coalescing; one unnecessaryimport.meta as anycast removed (vite client types already cover it).Hook dependencies: two genuinely missing deps added (
fetchMandate, a stable useCallback, andmonitoringData?.qty, which the poll body reads); the scroll on new message effect now readschatState.messages.lengthin its guard so its dependency is genuine, with behavior unchanged apart from not scrolling an empty chat.Stylesheet: the touched
InventoryOptionsCard.scssbrought current with stylelint standard (modern color function notation, percentage alpha, unquoted font family), since Super Linter lints changed stylesheets.Dead code in
mandateEntries.tsremoved; this also fixesnpm run build, which fails on current main with three unused declaration tsc errors and passes after this change.cspell: the generated diagram SVGs (249 Raphael object ids) are excluded via
ignorePathsrather than polluting the dictionary; the three legitimate code words are added to custom words.Linter workflow: four more validators joined the existing disable list.
CSS_PRETTIERandTYPESCRIPT_PRETTIERfollow the pattern already set for the markdown, javascript, json and yaml prettier variants.TSXandTYPESCRIPT_ESrun the bundled ESLint default config, which expects the legacy React in scope JSX transform and cannot resolve extensionless TypeScript imports, so they flag every line of the Vite based web client regardless of content; Biome and tsc via the vite build cover those files. These four had never fired before because no PR had touched a stylesheet or TypeScript file since the linter was configured. Happy to take a different direction here if you prefer, for example a repo ESLint config instead of disabling. Editing the workflow also brought it into zizmor scope, which flagged two of its own preexisting findings; both are addressed here: the two action references are now pinned to their release commit hashes (checkout v5, super linter v8.7.0, the exact version whose behavior this PR was validated against), and the workflow declares least privilege permissions (contents read, statuses write).Verification
npx @biomejs/biome@2 lint code/web-client/src docs/assets: zero findings of any severity (no errors, no warnings, no infos). Whole workspace: zero across all 80 files, so the workspace wide Biome pass cannot trip on anything regardless of severity mapping.npm run buildin code/web-client passes (it fails on clean main).