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
@@ -6,7 +6,6 @@ import { trpc } from "~/lib/trpc/client.js";
import type { WidgetProps } from "~/components/dashboard/widget-registry.js";
import { TaskCard } from "~/components/notifications/TaskCard.js";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function TaskWidget(_props: Partial<WidgetProps> = {}) {
const utils = trpc.useUtils();
@@ -15,10 +14,13 @@ export function TaskWidget(_props: Partial<WidgetProps> = {}) {
{ staleTime: 30_000, placeholderData: (prev) => prev },
);
const { data: taskCounts, isLoading: loadingCounts } = trpc.notification.taskCounts.useQuery(undefined, {
staleTime: 30_000,
placeholderData: (prev) => prev,
});
const { data: taskCounts, isLoading: loadingCounts } = trpc.notification.taskCounts.useQuery(
undefined,
{
staleTime: 30_000,
placeholderData: (prev) => prev,
},
);
const updateTaskStatus = trpc.notification.updateTaskStatus.useMutation({
onSuccess: () => {
@@ -30,7 +32,10 @@ export function TaskWidget(_props: Partial<WidgetProps> = {}) {
});
function handleStatusChange(id: string, status: string) {
updateTaskStatus.mutate({ id, status: status as "OPEN" | "IN_PROGRESS" | "DONE" | "DISMISSED" });
updateTaskStatus.mutate({
id,
status: status as "OPEN" | "IN_PROGRESS" | "DONE" | "DISMISSED",
});
}
const openCount = (taskCounts?.open ?? 0) + (taskCounts?.inProgress ?? 0);