chore(frontend): ordonner les alias @/i18n avant la regle generique

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018BAUeCFpDkRD6tU5wGsc1C
This commit is contained in:
David 2026-09-07 21:40:49 +02:00
parent 6f3eae5635
commit 607995b3d0
2 changed files with 6 additions and 3 deletions

View File

@ -12,7 +12,10 @@ const customConfig = {
], ],
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.next/', '<rootDir>/e2e/'], testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.next/', '<rootDir>/e2e/'],
moduleNameMapper: { 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/(.*)$': '<rootDir>/app/$1', '^@/app/(.*)$': '<rootDir>/app/$1',
'^@/i18n/(.*)$': '<rootDir>/i18n/$1',
'^@/(.*)$': '<rootDir>/src/$1', '^@/(.*)$': '<rootDir>/src/$1',
}, },
}; };

View File

@ -20,15 +20,15 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./src/*"], "@/app/*": ["./app/*"],
"@/i18n/*": ["./i18n/*"],
"@/components/*": ["./src/components/*"], "@/components/*": ["./src/components/*"],
"@/lib/*": ["./src/lib/*"], "@/lib/*": ["./src/lib/*"],
"@/app/*": ["./app/*"],
"@/types/*": ["./src/types/*"], "@/types/*": ["./src/types/*"],
"@/hooks/*": ["./src/hooks/*"], "@/hooks/*": ["./src/hooks/*"],
"@/utils/*": ["./src/utils/*"], "@/utils/*": ["./src/utils/*"],
"@/pages/*": ["./src/pages/*"], "@/pages/*": ["./src/pages/*"],
"@/i18n/*": ["./i18n/*"] "@/*": ["./src/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],