Skip to content

static: biome --write cleanups (optional-chain + unused catch binding) - #21

Merged
mousebrains merged 1 commit into
mainfrom
static-biome-reformat
May 24, 2026
Merged

static: biome --write cleanups (optional-chain + unused catch binding)#21
mousebrains merged 1 commit into
mainfrom
static-biome-reformat

Conversation

@mousebrains

Copy link
Copy Markdown
Owner

Applies biome's fixable lint findings to the three JS files that #18's glob coverage (biome.jsonstatic/**/*.js) started linting but hadn't yet fixed.

Changes (all mechanical, semantically identical):

  • map.js, feature-map.js, gradient-profile.js: useOptionalChain on plain object property reads — f.geometry && f.geometry.coordinatesf.geometry?.coordinates; (geom && geom.features) || [](geom?.features) || []; !payload || !payload.samples!payload?.samples.
  • gradient-profile.js: noUnusedVariables — unused catch (e)catch (_e).

biome check is now clean (0 warnings). Cache-bust ?v= is mtime-derived, so the files ship with fresh versions.

Already deployed: run live via levels build on the host (verified: docroot JS matches repo, map.js?v=1779655707, site 200, served map.js carries the optional-chain change). PR is for the record + CI; the live tree sits on this branch until merge.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Apply biome's fixable lint findings to the three JS files that PR #18's
glob coverage (biome.json static/**/*.js) started linting but did not yet
fix: useOptionalChain in map.js / feature-map.js / gradient-profile.js,
and a noUnusedVariables catch binding (catch (e) -> catch (_e)).

All mechanical and semantically identical — optional chaining on plain
object property reads (f.geometry && f.geometry.coordinates ->
f.geometry?.coordinates), and the !payload || !payload.samples guard
collapses to !payload?.samples. `biome check` is now clean (0 warnings).

Cache-bust ?v= is mtime-derived (_shared.py), so the reformatted files
ship with fresh versions on the next `levels build`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mousebrains
mousebrains merged commit ea94b1a into main May 24, 2026
8 checks passed
@mousebrains
mousebrains deleted the static-biome-reformat branch May 25, 2026 15:00
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