Fondation

This commit is contained in:
alma 2026-01-16 22:59:58 +01:00
parent 5744fd9724
commit 0977765a87
3 changed files with 13 additions and 6 deletions

8
.eslintrc.json Normal file
View File

@ -0,0 +1,8 @@
{
"extends": ["next/core-web-vitals", "next/typescript"],
"rules": {
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"react-hooks/exhaustive-deps": "warn"
}
}

View File

@ -7,7 +7,7 @@ import { logger } from '@/lib/logger';
// POST /api/notifications/[id]/read // POST /api/notifications/[id]/read
export async function POST( export async function POST(
request: Request, request: Request,
{ params }: { params: { id: string } } { params }: { params: Promise<{ id: string }> }
) { ) {
try { try {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);
@ -15,7 +15,8 @@ export async function POST(
return NextResponse.json({ error: "Not authenticated" }, { status: 401 }); return NextResponse.json({ error: "Not authenticated" }, { status: 401 });
} }
const notificationId = params.id; const { id } = await params;
const notificationId = id;
if (!notificationId) { if (!notificationId) {
return NextResponse.json( return NextResponse.json(
{ error: "Notification ID is required" }, { error: "Notification ID is required" },

View File

@ -1,9 +1,7 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
eslint: { // Note: ESLint configuration is now done via .eslintrc.json or next lint command
ignoreDuringBuilds: false, // ✅ Réactivé - corriger les erreurs avant build // The eslint option in next.config.mjs is deprecated in Next.js 16
dirs: ['app', 'components', 'lib'], // Limiter aux dossiers pertinents
},
typescript: { typescript: {
ignoreBuildErrors: false, // ✅ Réactivé - corriger les erreurs avant build ignoreBuildErrors: false, // ✅ Réactivé - corriger les erreurs avant build
}, },