Skip to content

fix(biome.js) :: fix remaining lint issues - #1366

Open
81reap wants to merge 1 commit into
sqlpage:mainfrom
81reap:stack/1-biome-lint
Open

fix(biome.js) :: fix remaining lint issues#1366
81reap wants to merge 1 commit into
sqlpage:mainfrom
81reap:stack/1-biome-lint

Conversation

@81reap

@81reap 81reap commented Aug 8, 2026

Copy link
Copy Markdown

Motivation

  • biome check . reports 18 warnings on a clean checkout, so a warning introduced by a new change is easy to miss.
  • A developer's local .claude/settings.local.json is checked too, and fails the run outright.

Description

  • Drop !important from the declarations that do not need it.
  • Keep it, with a biome-ignore naming the reason, in the three places that do: leaflet injects its stylesheet after ours, tabler's spacing utilities are themselves !important, and .markdown pre caps the height a print rule has to override.
  • Use optional chaining in mdastToDelta and open_modal_for_hash.
  • Remove a biome-ignore for noUnusedVariables that no longer matches anything.
  • Drop a @ts-ignore on a typed Buffer.from call, and give three Number.parseInt calls their radix.
  • Ignore .claude/*.json in biome.json, alongside the existing .zed/*.json.

Testing

  • npm test checks 36 files and reports nothing, where the base reports 18 warnings and 3 infos.
  • The browser suite passes 21 tests against a local official site.
  • no console errors on card page fails here and on the unmodified base alike: the page loads avatars from avatars.githubusercontent.com, which this machine cannot verify (ERR_CERT_AUTHORITY_INVALID).

GitHub cannot base a pull request on a branch that lives in a fork, so all eight target main and each one carries the commits of those above it. Review and merge them in order:

  1. fix(biome.js) :: fix remaining lint issues #1366 :: fix(biome.js) :: fix remaining lint issues ← this PR
  2. fix(modal) :: give modal component an accessible name #1367 :: fix(modal) :: give modal component an accessible name
  3. fix(map) :: ignore map coordinates that are not a pair of numbers #1368 :: fix(map) :: ignore map coordinates that are not a pair of numbers
  4. feat(chart) :: render column charts as bar charts #1369 :: feat(chart) :: render column charts as bar charts
  5. fix(chart) :: align stacked series on their X values #1370 :: fix(chart) :: align stacked series on their X values
  6. fix(chart) :: line series up on a category axis for every chart type #1371 :: fix(chart) :: line series up on a category axis for every chart type
  7. fix(npm) :: install dependencies only once at root level #1372 :: fix(npm) :: install dependencies only once at root level
  8. feat(typescript) :: typecheck browser JavaScript in CI #1373 :: feat(typescript) :: typecheck browser JavaScript in CI

@81reap

81reap commented Aug 9, 2026

Copy link
Copy Markdown
Author

More validations including screenshots. LMK if there's any comments/questions/concerns and I will address them :)

$ npm test

> sqlpage@1.0.0 test
> biome check .

Checked 36 files in 23ms. No fixes applied.
$ cargo build
Compiling sqlpage v0.45.0 (/home/reap/Desktop/SQLPage)
 Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.82s
$ cargo test
   Compiling sqlpage v0.45.0 (/home/reap/Desktop/SQLPage)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 15.15s
     Running unittests src/lib.rs (target/debug/deps/sqlpage-9c0b80f3c9b03581)

running 175 tests
[...]

test result: ok. 175 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.47s

     Running unittests src/main.rs (target/debug/deps/sqlpage-6d93c28a6118a58e)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/mod.rs (target/debug/deps/mod-6dd7f46546fbaa06)

running 72 tests
[...]

test result: ok. 72 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.29s

   Doc-tests sqlpage

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
$ cd examples/official-site
$ SQLPAGE_PORT=8099 ../../target/debug/sqlpage 
Screenshot_2026-08-08_21-13-04 Screenshot_2026-08-08_21-13-13

@81reap

81reap commented Aug 9, 2026

Copy link
Copy Markdown
Author

I did also run integration tests. All but one of them passed on my dev machine. The one that fails seems to be a cert issue unrelated to my changes. I will defer to the automated CI runs to confirm. @lovasoa would you be able to start the workflow for me?

$ npx playwright test

Running 22 tests using 8 workers
[chromium] › official-site.spec.ts:21:5 › chart
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:233:5 › form example
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:264:5 › Authentication example
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:44:5 › toast notifications initialize, stack, dismiss, and render safely
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:38:5 › map
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:27:5 › chart supports hiding legend
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:5:5 › Open documentation
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
[chromium] › official-site.spec.ts:247:5 › File upload
Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.
  1) [chromium] › official-site.spec.ts:356:5 › no console errors on card page ─────────────────────

    Error: expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2
    Received array:  ["Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID", "Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID"]

      339 |   await page.waitForLoadState();
      340 |
    > 341 |   expect(errors).toHaveLength(0);
          |                  ^
      342 | }
      343 |
      344 | test("no console errors on table page", async ({ page }) => {
        at checkNoConsoleErrors (/home/reap/Desktop/SQLPage/tests/end-to-end/official-site.spec.ts:341:18)
        at /home/reap/Desktop/SQLPage/tests/end-to-end/official-site.spec.ts:357:3

    Error Context: test-results/official-site-no-console-errors-on-card-page-chromium/error-context.md

  1 failed
    [chromium] › official-site.spec.ts:356:5 › no console errors on card page ──────────────────────
  21 passed (7.5s)

  Serving HTML report at http://localhost:9323. Press Ctrl+C to quit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant