chore: add pre-commit hooks, tighten ESLint, activate Sentry DSN, publish CI coverage (Phase 1)

- Install husky v9 + lint-staged: pre-commit runs eslint --fix and prettier on staged files
- Tighten ESLint base config: no-console→error, ban-ts-comment (ts-ignore banned, ts-expect-error with description allowed), reportUnusedDisableDirectives→error
- Migrate web app from deprecated `next lint` to `eslint src/` with flat config and react-hooks plugin
- Convert all 5 @ts-ignore to @ts-expect-error with descriptions, remove stale disable comments
- Add NEXT_PUBLIC_SENTRY_DSN to docker-compose.prod.yml and .env.example
- Add coverage artifact upload step to CI test job
- Pre-existing violations (102 warnings) downgraded to warn in web config for Phase 2 cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 14:49:29 +02:00
parent 605fd7cea1
commit 82acc56b8d
38 changed files with 2901 additions and 1251 deletions
+34 -18
View File
@@ -35,23 +35,29 @@ export function useTimelineLayout(
);
// Grid lines — memoized; identical for every row
const gridLines = useMemo(() => dates.map((date, i) => {
const isToday = date.toDateString() === today.toDateString();
const dow = date.getDay();
const isWeekend = dow === 0 || dow === 6;
return (
<div
key={i}
className={clsx(
"absolute top-0 bottom-0 border-r",
isToday ? "border-brand-300 dark:border-brand-700 border-r-2" :
isWeekend ? "border-brand-200 dark:border-brand-800 bg-brand-50/40 dark:bg-brand-950/20" :
"border-gray-100 dark:border-gray-800",
)}
style={{ left: i * CELL_WIDTH, width: CELL_WIDTH }}
/>
);
}), [dates, CELL_WIDTH, today]); // eslint-disable-line react-hooks/exhaustive-deps
const gridLines = useMemo(
() =>
dates.map((date, i) => {
const isToday = date.toDateString() === today.toDateString();
const dow = date.getDay();
const isWeekend = dow === 0 || dow === 6;
return (
<div
key={i}
className={clsx(
"absolute top-0 bottom-0 border-r",
isToday
? "border-brand-300 dark:border-brand-700 border-r-2"
: isWeekend
? "border-brand-200 dark:border-brand-800 bg-brand-50/40 dark:bg-brand-950/20"
: "border-gray-100 dark:border-gray-800",
)}
style={{ left: i * CELL_WIDTH, width: CELL_WIDTH }}
/>
);
}),
[dates, CELL_WIDTH, today],
);
// Month groups for the month header
const monthGroups = useMemo(() => {
@@ -72,5 +78,15 @@ export function useTimelineLayout(
return dates[colIndex] ?? today;
}
return { CELL_WIDTH, dates, visibleDays, totalCanvasWidth, toLeft, toWidth, gridLines, monthGroups, xToDate };
return {
CELL_WIDTH,
dates,
visibleDays,
totalCanvasWidth,
toLeft,
toWidth,
gridLines,
monthGroups,
xToDate,
};
}