fix lint pipeline for next 16 and remove legacy group id route

This commit is contained in:
Nico 2026-02-14 00:47:45 -08:00
parent b1c8a4ae6c
commit 1f140b6884
4 changed files with 34 additions and 15 deletions

View File

@ -1,14 +0,0 @@
import { redirect } from "next/navigation";
import { getSessionUser } from "@/lib/server/session";
import GroupSettingsContent from "@/components/group-settings-content";
export default async function GroupSettingsPage({ params }: { params: Promise<{ id: string }> }) {
const user = await getSessionUser();
if (!user) redirect("/login");
const { id } = await params;
const groupId = Number(id || 0);
if (!groupId) redirect("/");
return <GroupSettingsContent groupId={groupId} />;
}

View File

@ -0,0 +1,15 @@
import nextVitals from "eslint-config-next/core-web-vitals";
const config = [
...nextVitals,
{
rules: {
"react-hooks/error-boundaries": "off",
"react-hooks/immutability": "off",
"react-hooks/purity": "off",
"react-hooks/set-state-in-effect": "off"
}
}
];
export default config;

View File

@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint && node scripts/check-no-group-id-routes.cjs",
"lint": "eslint . && node scripts/check-no-group-id-routes.cjs",
"test": "node __tests__/run-tests.cjs",
"pretest:ui": "npm --prefix ../.. --workspace @fiddy/db run test:ui-seed",
"test:ui": "playwright test"

View File

@ -62,6 +62,24 @@ Primary outcomes:
- Replaced `rowCount` checks with `rows.length` in typed query paths to satisfy current TypeScript/`pg` typings.
- Implementation correction note:
- A batch replacement briefly introduced invalid destructuring (`request_id` in `getRequestMeta` destructure). This was corrected in all affected routes before final verification.
- Created path-scoped commit for this hardening slice:
- `b1c8a4a``harden public launch api contracts and ops baseline`.
- Resolved lint pipeline breakage caused by `next lint` invocation under Next.js `16.1.6`:
- Switched `apps/web/package.json` lint script to `eslint . && node scripts/check-no-group-id-routes.cjs`.
- Added `apps/web/eslint.config.mjs` using `eslint-config-next/core-web-vitals`.
- Disabled newly surfaced React compiler-style hook rules to preserve prior lint parity without broad unrelated refactors:
- `react-hooks/error-boundaries`
- `react-hooks/immutability`
- `react-hooks/purity`
- `react-hooks/set-state-in-effect`
- Fixed a real hook-order violation in `apps/web/components/group-settings-content.tsx` by moving the keyboard-listener `useEffect` above the early `return`.
- Removed forbidden legacy dynamic route path under `app/groups` to satisfy repo policy script:
- Deleted `apps/web/app/groups/[id]/settings/page.tsx`.
- Removed empty directory `apps/web/app/groups/[id]`.
- Re-ran verification after lint fixes:
- `npm test`: pass (`25 passed`, `1 skipped`).
- `npm run build`: pass.
- `npm run lint`: pass (warnings only; no errors).
### Risks / Notes to Revisit
- Workspace is intentionally dirty; commits must be path-scoped to avoid mixing unrelated changes.