From 607995b3d0ed53732ea5c0f54e38f29baecf6ba1 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 7 Sep 2026 21:40:49 +0200 Subject: [PATCH] chore(frontend): ordonner les alias @/i18n avant la regle generique Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018BAUeCFpDkRD6tU5wGsc1C --- apps/frontend/jest.config.js | 3 +++ apps/frontend/tsconfig.json | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/frontend/jest.config.js b/apps/frontend/jest.config.js index 7c16244..0d5231c 100644 --- a/apps/frontend/jest.config.js +++ b/apps/frontend/jest.config.js @@ -12,7 +12,10 @@ const customConfig = { ], testPathIgnorePatterns: ['/node_modules/', '/.next/', '/e2e/'], moduleNameMapper: { + // Ces deux alias ne pointent pas vers `src/` : ils doivent precede la regle + // generique, sans quoi `@/i18n/navigation` est cherche dans `src/i18n`. '^@/app/(.*)$': '/app/$1', + '^@/i18n/(.*)$': '/i18n/$1', '^@/(.*)$': '/src/$1', }, }; diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index b5726d1..b9d7f6c 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -20,15 +20,15 @@ } ], "paths": { - "@/*": ["./src/*"], + "@/app/*": ["./app/*"], + "@/i18n/*": ["./i18n/*"], "@/components/*": ["./src/components/*"], "@/lib/*": ["./src/lib/*"], - "@/app/*": ["./app/*"], "@/types/*": ["./src/types/*"], "@/hooks/*": ["./src/hooks/*"], "@/utils/*": ["./src/utils/*"], "@/pages/*": ["./src/pages/*"], - "@/i18n/*": ["./i18n/*"] + "@/*": ["./src/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],