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
export async function POST(
request: Request,
{ params }: { params: { id: string } }
{ params }: { params: Promise<{ id: string }> }
) {
try {
const session = await getServerSession(authOptions);
@ -15,7 +15,8 @@ export async function POST(
return NextResponse.json({ error: "Not authenticated" }, { status: 401 });
}
const notificationId = params.id;
const { id } = await params;
const notificationId = id;
if (!notificationId) {
return NextResponse.json(
{ error: "Notification ID is required" },

View File

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