Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ next-env.d.ts
# generated graphql files
/gql/generated/gql.ts
/gql/generated/graphql.ts
/gql/generated/
/gql/generated/
# next-agents-md
.next-docs/
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- BEGIN:nextjs-agent-rules -->

# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.

This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.

<!-- END:nextjs-agent-rules -->
2 changes: 1 addition & 1 deletion app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextIntlClientProvider } from 'next-intl';
import { unstable_setRequestLocale as setRequestLocale } from 'next-intl/server';
import { setRequestLocale } from 'next-intl/server';
import { Inter as FontSans } from 'next/font/google';
import { notFound } from 'next/navigation';
import React from 'react';
Expand Down
69 changes: 30 additions & 39 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import { defineConfig, globalIgnores } from 'eslint/config';
import nextVitals from 'eslint-config-next/core-web-vitals';
import nextTs from 'eslint-config-next/typescript';
import prettier from 'eslint-config-prettier';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

const config = [
{
ignores: [
'**/generated/**/*.ts',
'**/node_modules/**',
'**/dist/**',
'**/.next/**',
'**/next-env.d.ts',
'**/*.config.js',
'**/config/**/*.js',
'**/lib/style-dictionary/**/*.js',
'**/lib/eCharts.ts',
],
},
...compat.extends('next/core-web-vitals'),
...compat.extends('plugin:@typescript-eslint/recommended'),
...compat.extends('prettier'),
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
prettier,
globalIgnores([
'**/generated/**/*.ts',
'**/node_modules/**',
'**/dist/**',
'**/.next/**',
'**/out/**',
'**/build/**',
'**/next-env.d.ts',
'**/*.config.js',
'**/config/**/*.js',
'**/lib/style-dictionary/**/*.js',
'**/lib/eCharts.ts',
]),
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
Expand All @@ -51,8 +35,15 @@ const config = [
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-empty-object-type': 'warn',
'import/no-anonymous-default-export': 'warn',
// eslint-plugin-react-hooks v7 (via eslint-config-next 16) adds these.
// Keep prior lint behavior rather than rewriting existing effects.
'react-hooks/set-state-in-effect': 'off',
'react-hooks/immutability': 'off',
'react-hooks/use-memo': 'off',
'react-hooks/refs': 'off',
'react-hooks/preserve-manual-memoization': 'off',
},
},
];
]);

export default config;
export default eslintConfig;
1 change: 0 additions & 1 deletion i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import locales from './config/locales';
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;

console.log('locale', locale);
if (!locale || !locales.all.includes(locale as any)) {
locale = locales.default;
}
Expand Down
37 changes: 18 additions & 19 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ const withNextIntl = createNextIntlPlugin('./i18n.ts');

const nextConfig = withNextIntl({
transpilePackages: ['opub-ui'],

// next-intl v3 still writes aliases to experimental.turbo, which Next.js 16 ignores.
turbopack: {
resolveAlias: {
'next-intl/config': './i18n.ts',
},
},

// Performance optimizations
experimental: {
Expand Down Expand Up @@ -80,7 +87,7 @@ const nextConfig = withNextIntl({
},
});

export default withSentryConfig(
const sentryConfig = withSentryConfig(
nextConfig,
{
// For all available options, see:
Expand All @@ -103,23 +110,15 @@ export default withSentryConfig(
disable: process.env.NODE_ENV === 'development',
},

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,
treeshake: {
removeDebugLogging: true,
},
}
);

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// next-intl v3 still injects experimental.turbo; Next.js 16 only accepts top-level turbopack.
if (sentryConfig?.experimental?.turbo) {
delete sentryConfig.experimental.turbo;
}

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
},
process.env.SENTRY_FEATURE_ENABLED === 'true'
);
export default sentryConfig;
Loading
Loading