chore(docs): turn on no-unused-vars, and pin the analytics split - #416
Conversation
Two review findings, both about a guard that was not there.
**The dead variable was the symptom.** A `const domain` in the GraphQL field
page was assigned and never read — the neighbour nav computes its own. Lint
could not catch it because `@typescript-eslint/no-unused-vars` is off across
the repo, so the rule is on now and the 24 violations it found are fixed.
Most were genuinely dead; the rest are arguments whose position callers rely
on, marked `_`. Two of those destructures exist precisely to keep a prop off
the DOM element, so they are renamed rather than removed — `Progress` in the
flowbite mocks reads `color` and only `size` was unused.
**The analytics split is load-bearing copy.** The extensions hub decided its
three sections with `tag.name.includes('Analytical Views')` inline in the page,
untested. The failure mode is not a missing section: a tag renamed away from
that string lands in *Writes*, beside copy promising each operation "takes a
typed request, returns an operation envelope" and accepts an Idempotency-Key —
said of read-only queries against the materialized graph. It is now
`partitionExtensionTags` in `lib/openapi.ts` with four tests, including that an
unrecognised tag still lands somewhere rather than being dropped. Renaming the
match fails three of them.
`npm run test:all`: 580 passed, lint, format, typecheck clean.
Claude-Session: https://claude.ai/code/session_01C3sS2qq4GbycMSSKr6vsf3
|
Change classification: normal — platform or application code changed. A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 18s —— View job Review complete
Went through the diff against
Lint fixes — spot-checked the riskiest-looking ones (removed props/destructures, not just renamed args):
One loose end (non-blocking): in Nothing else stood out — no behavior changes, no silently-broken JSX, no places where the "unused" var was actually a prop DOM elements needed. Config change ( I wasn't able to run Verdict: looks good to merge as-is; the |
Two findings from the post-merge review, both really about a guard that wasn't there.
The dead variable was the symptom
A
const domainin the GraphQL field page was assigned and never read — the neighbour nav computes its own. Lint couldn't catch it because@typescript-eslint/no-unused-varswas off repo-wide, which is the actual finding.The rule is on now. It found 24 violations across 14 files, all fixed:
usage/content.tsx— deleted_catch (error)with an unused binding → optional catch bindingGET(request: Request)in a route handler that ignores it →GET()Two destructures exist precisely to keep a prop off the DOM element, so they're renamed rather than removed.
Progressin the flowbite mocks readscolorviadata-color; onlysizewas unused there — worth saying because my first pass renamed both and broke it.The analytics split is load-bearing copy
The extensions hub decided its three sections with
tag.name.includes('Analytical Views'), inline in the page component and untested.The failure mode isn't a missing section. A tag renamed away from that string doesn't disappear — it lands in Writes, beside copy promising every operation "takes a typed request, returns an operation envelope" and accepts an
Idempotency-Key. Said of read-only queries against the materialized graph, that's wrong copy about what a call does.It's now
partitionExtensionTagsinlib/openapi.tswith four tests, including that an unrecognised tag still lands in writes rather than being dropped, and that analytics are recognised for any domain rather than RoboLedger only. Renaming the match fails three of them — mutation-verified.Verification
npm run test:all: 580 passed (70 files), format, lint, typecheck clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01C3sS2qq4GbycMSSKr6vsf3