Repository navigation
chore(cli-site): migrate lint to ESLint 9 flat config - #11
Draft
agentiknet wants to merge 1 commit into
Draft
agentiknet wants to merge 1 commit into
agentiknet wants to merge 1 commit into
Conversation
Next 16 removed the `next lint` subcommand and the repo carried no eslint config, so `pnpm lint` has been erroring out — nothing has been linted for months, and no workflow called it either. - add eslint + eslint-config-next as devDeps; eslint-config-next 16 ships flat configs natively, so no @eslint/eslintrc FlatCompat shim is needed - eslint.config.mjs = core-web-vitals + typescript (the flat equivalent of the legacy next/core-web-vitals + next/typescript extends), kept byte-identical with the site sibling - reportUnusedDisableDirectives: error, so a suppression cannot outlive the rule it suppresses — which is exactly how this rotted - lint script runs `eslint . --max-warnings=0`; wire it into CI Violations the newly-live lint surfaced: - drop two dead `no-control-regex` suppressions — that rule is not part of eslint-config-next, so the comments never suppressed anything - escape an apostrophe in SessionChatView (react/no-unescaped-entities) - drop the unused `ev` param on the PTY socket close handler - turn off react-hooks/set-state-in-effect + react-hooks/refs, new React-Compiler advisories from eslint-plugin-react-hooks v7. They flag ~11 sites in the daemon panel (reset-on-session-change effects, refs mirrored during render). Converting those is a behavioural refactor of a live interactive UI, not a rider on a lint migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pnpm linthas been broken in this repo. It runsnext lint, a subcommandNext.js 16 removed, and the repo carries no eslint config at all. So the
script just errors — and no workflow ever called it. Nothing has been linted
here for months.
What
Migrate to the setup Next 16 expects —
eslint+eslint-config-nextviaeslint.config.mjs(flat config).eslint.config.mjs—eslint-config-next16 ships flat configsnatively, so no
@eslint/eslintrcFlatCompatshim.core-web-vitals+typescriptare the flat equivalent of the legacyextends: ["next/core-web-vitals", "next/typescript"].Byte-identical with the site sibling — the two repos share components
and scripts.
reportUnusedDisableDirectives: "error"— a suppression can no longeroutlive the rule it suppresses. That is precisely how this rotted, and it
applies in editors too, which a CLI flag would not. It immediately earned
its keep (see below).
lintscript →eslint . --max-warnings=0.pnpm lint(source-only, needs no content sync), so itcannot go silently non-functional again. Job renamed to
Lint + type-check + build;mainhas no branch protection, so no requiredcheck name is disturbed.
Violations surfaced — 14 errors, 1 warning
Fixed:
no-control-regexsuppressions (SessionChatView.tsx:67,ToolBlocks.tsx:59) — that rule is not part ofeslint-config-next, sothose comments never suppressed anything. Removed. If we want the guard on
these ANSI-stripping regexes it is a one-line
rulesaddition; left out tokeep the config vanilla-Next. Say the word and I will add it.
react/no-unescaped-entities— escaped an apostrophe inSessionChatView.tsx.@typescript-eslint/no-unused-vars— dropped the unusedevparam on thePTY socket
closehandler.Re-scoped, not fixed —
react-hooks/set-state-in-effectandreact-hooks/refsturned off in the config, with the rationale written intothe file:
These are React-Compiler-era advisories, new in
eslint-plugin-react-hooksv7 (pulled in by
eslint-config-next16). They are performance advice, notcorrectness bugs. They flag ~11 sites across
panel/page.tsx,SessionChatView.tsx,use-daemon.tsanduse-session-events.ts— thereset-state-on-session-change effects and the refs mirrored during render that
the daemon panel is built on. Converting those is a behavioural refactor of a
live interactive UI and belongs in its own PR where it can actually be
exercised against a running daemon — not as a rider on a lint migration.
Happy to split that follow-up out if you want it tracked as an issue.
Verification
pnpm lint→ exit 0, 0 errors, 0 warnings, 0 unused directivestsc --noEmit→ exit 0Not in scope
The site repos have no committed lockfile (CI installs with
--no-frozen-lockfile); they resolve from the agentik-studio root lockfile,where the two new devDeps land as a separate commit.
Coordination
Sibling PR: agentproto/site — same branch name, identical
eslint.config.mjs. Merge together.Independent of the in-flight copy-only PR #10 (
copy/facts-refresh-2026-09);this branched from
origin/main.The new Lint step passes. So does Type-check. The Build step fails —
and it already failed before this branch existed:
./content/docs/guides/sandbox-rendezvous.mdx29:2: Unexpected character '!'prebuildclonesagentproto/ts@mainintocontent/docs/at build time, sothe site build tracks upstream CLI docs.
sandbox-rendezvous.mdxhas driftedinto MDX that
fumadocs-mdxrejects (a<!-- -->HTML comment, which MDX doesnot accept). Last green run on
mainhere was 2026-07-12.That means the site build — and therefore the deploy — is currently broken
independently of lint. It needs a fix in
agentproto/ts, not here.Tracking separately.