No JS linting, so the styleguide REPO_POLICIES binds us to is unenforced #120

Open
opened 2026-08-11 14:45:30 +02:00 by clawbot · 0 comments
Collaborator

REPO_POLICIES.md binds this repo to a JS styleguide ("Use const for everything... Never use var"), but nothing checks it. script/fmt-check is gofmt -s -l . only, and script/lint is golangci-lint — both Go-only. static/js/app.js is covered by no tooling at all.

This is not hypothetical: the review of #116 failed on five var declarations in static/js/app.js that a fully green make check and a cache-defeated script/cibuild both passed. The gate cannot see the file.

The JS surface here is small, which is the argument for fixing it now while it is cheap rather than after it grows.

Definition of done

  • A linter covers static/js/ and runs as part of script/lint, so make check and CI both fail on a styleguide violation.
  • It runs in Docker, consistent with #109's direction for lint tooling, and is pinned by digest per repo policy — not installed ad hoc on the host.
  • Acceptance check: reintroducing a var in static/js/app.js makes the gate go red. Without that demonstration the fix is unverified.

Implementation notes

  • Whatever tool is chosen should be configured to the styleguide REPO_POLICIES.md names, not to its own defaults.
  • Consider whether the existing lint container can host it rather than adding a second image.
  • Branch from next, PR based on next, single commit, title ending (closes #N).
`REPO_POLICIES.md` binds this repo to a JS styleguide ("Use `const` for everything... Never use `var`"), but nothing checks it. `script/fmt-check` is `gofmt -s -l .` only, and `script/lint` is golangci-lint — both Go-only. `static/js/app.js` is covered by no tooling at all. This is not hypothetical: the review of https://git.eeqj.de/sneak/webhooker/pulls/116 failed on five `var` declarations in `static/js/app.js` that a fully green `make check` and a cache-defeated `script/cibuild` both passed. The gate cannot see the file. The JS surface here is small, which is the argument for fixing it now while it is cheap rather than after it grows. ## Definition of done - A linter covers `static/js/` and runs as part of `script/lint`, so `make check` and CI both fail on a styleguide violation. - It runs in Docker, consistent with https://git.eeqj.de/sneak/webhooker/issues/109's direction for lint tooling, and is pinned by digest per repo policy — not installed ad hoc on the host. - Acceptance check: reintroducing a `var` in `static/js/app.js` makes the gate go red. Without that demonstration the fix is unverified. ## Implementation notes - Whatever tool is chosen should be configured to the styleguide `REPO_POLICIES.md` names, not to its own defaults. - Consider whether the existing lint container can host it rather than adding a second image. - Branch from `next`, PR based on `next`, single commit, title ending ` (closes #N)`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#120