fix(build): resolve Next.js build failures from invalid route exports

- Extract detectAuthAnomalies + THRESHOLDS from route.ts to detect.ts
  (Next.js rejects non-standard exports from route files)
- Add explicit RenderResult return type to test-utils customRender
- Skip ESLint during next build (runs separately via pnpm lint)
- Revert test file exclusions from tsconfig (breaks eslint parser)
- Update route.test.ts imports to match new file structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 07:40:00 +02:00
parent d8aac21e2d
commit 4469fc42af
5 changed files with 122 additions and 108 deletions
+6
View File
@@ -17,6 +17,11 @@ const nextConfig: NextConfig = {
"@capakraken/staffing",
],
typedRoutes: true,
eslint: {
// ESLint runs separately via `pnpm lint` — skip during `next build` to
// avoid plugin resolution issues in the build environment.
ignoreDuringBuilds: true,
},
async redirects() {
return [
// Common URL alias — redirect to the real auth entry point
@@ -86,6 +91,7 @@ const nextConfig: NextConfig = {
let exportedConfig: NextConfig = nextConfig;
if (process.env.NODE_ENV === "production") {
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { withSentryConfig } = require("@sentry/nextjs");
exportedConfig = withSentryConfig(nextConfig, {
silent: true,