Skip to content

chore(lint): clear the 8 existing ESLint errors so #128 can land#133

Merged
gkhngyk merged 1 commit into
mainfrom
chore/lint-cleanup
May 31, 2026
Merged

chore(lint): clear the 8 existing ESLint errors so #128 can land#133
gkhngyk merged 1 commit into
mainfrom
chore/lint-cleanup

Conversation

@gkhngyk

@gkhngyk gkhngyk commented May 31, 2026

Copy link
Copy Markdown
Contributor

What

#128 (external contributor, thanks @ayobamiseun) adds yarn lint to the web CI job. As-is it would break every PR, because the codebase has 8 existing ESLint errors that the new step would catch. This PR clears them so #128 can merge without taking main red.

Verified locally: yarn lint exits 0 (11 warnings remain — unused imports etc. — out of scope, don't fail the build).

Errors fixed

File Error Fix
web/src/lib/mcp/data.ts @typescript-eslint/no-explicit-any on JSON-shaped Supabase rows Replace any with Record<string, unknown>. Mirrors the existing GeneratedBrief.brief typing right next to them.
web/src/components/layout/sidebar.tsx react-hooks/set-state-in-effect on hydration mount flag Disable on the setMounted(true) line with a comment. Canonical Next.js theme-swap pattern — SSR can't know resolvedTheme, so we render the light logo first and swap after hydration. No useEffect-free version avoids the hydration mismatch.
web/src/components/layout/mobile-nav.tsx Same as sidebar Same fix; the two components mirror each other.
web/src/app/[locale]/invite/[token]/page.tsx react-hooks/purity on Date.now() expiration check Disable on that line with a comment. Server component renders fresh per request, the purity rule targets client-side memoization concerns that don't apply on the server.

Out of scope

  • The 11 unused-import warnings. They don't fail the build; cleaning them is mechanical and doesn't belong in this PR.
  • The (@next/next/no-img-element) warning on ai-provider-avatar.tsx — separate next/image migration, also doesn't fail the build.

Merge sequence

  1. This PR
  2. fix(ci): add eslint check to web job in CI workflow #128 (CI lint step) — should now go green
  3. Re-cut the 0.1.2 release (closed chore(release): 0.1.2 #132 lives at release/0.1.2 branch, ready to reopen)

The eslint-config-next ruleset surfaced 8 errors in the current
codebase. Once the CI lint job from #128 merges, every PR (including
the 0.1.2 release) would fail on these. Clearing them first so #128 can
land without breaking main.

- mcp/data.ts: 5x `any` on JSON-shaped Supabase rows → `Record<string, unknown>`.
  Matches the existing `GeneratedBrief.brief` typing right next to them
  and gives consumers an explicit narrow-required surface.
- sidebar.tsx, mobile-nav.tsx: setState-in-effect on a hydration mount
  flag. This is the canonical Next.js theme-swap pattern — SSR can't
  know resolvedTheme, so we render the light logo first and swap after
  hydration. No useEffect-free version avoids the mismatch; disable the
  rule on the setMounted line with a comment explaining the intent.
- invite/[token]/page.tsx: `Date.now()` purity error on the expiration
  check. This is a server component rendering per request, the rule
  targets client-side memoization concerns that don't apply on the
  server. Disable with a comment.

Warnings (unused imports etc.) untouched — they don't fail the build,
and addressing them is mechanical cleanup that doesn't belong in this
PR.
@gkhngyk gkhngyk merged commit 20ee473 into main May 31, 2026
4 checks passed
This was referenced May 31, 2026
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