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)`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
REPO_POLICIES.mdbinds this repo to a JS styleguide ("Useconstfor everything... Never usevar"), but nothing checks it.script/fmt-checkisgofmt -s -l .only, andscript/lintis golangci-lint — both Go-only.static/js/app.jsis covered by no tooling at all.This is not hypothetical: the review of #116 failed on five
vardeclarations instatic/js/app.jsthat a fully greenmake checkand a cache-defeatedscript/cibuildboth 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
static/js/and runs as part ofscript/lint, somake checkand CI both fail on a styleguide violation.varinstatic/js/app.jsmakes the gate go red. Without that demonstration the fix is unverified.Implementation notes
REPO_POLICIES.mdnames, not to its own defaults.next, PR based onnext, single commit, title ending(closes #N).