Skip to content

Commit afb9577

Browse files
authored
merge pull request #71 from r4topunk/claude/upgrade-nextjs-16-7JBRA
Upgrade to Next.js 16 and modernize ESLint config
2 parents c31a18d + 629fbd2 commit afb9577

28 files changed

Lines changed: 1514 additions & 1460 deletions

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ No unit test runner; Playwright e2e only. `tests/e2e/propdates.spec.ts`, `tests/
3636
src/
3737
├── app/ # App Router — 25+ routes incl. /auctions /proposals /propose /tv /members /treasury /feed /propdates /droposals /installations /blogs /coin-proposal /community/bounties /map /mural
3838
│ ├── api/ # 18 route groups (alchemy, coins, ens, og, pinata, propdates, proposals, treasury, tv, …)
39-
│ └── md/ # markdown content-negotiation target (see middleware)
39+
│ └── md/ # markdown content-negotiation target (see proxy.ts)
4040
├── components/ # 24 feature dirs + ui/ (shadcn)
4141
├── hooks/ # 40 hooks — see naming note below
4242
├── services/ # 16 data-layer modules (auctions, proposals, treasury, feed, members, farcaster, poidh, snapshot, …)
@@ -45,7 +45,7 @@ src/
4545
├── types/ # shared TS interfaces
4646
├── utils/abis/ # contract ABIs (erc20, …)
4747
├── workers/ # client-side search workers (blog, proposal)
48-
└── middleware.ts # Accept: text/markdown → rewrite to /md/*
48+
└── proxy.ts # Accept: text/markdown → rewrite to /md/* (Next.js 16 proxy convention, formerly middleware.ts)
4949
```
5050

5151
### Hook naming (drift to be aware of)

eslint.config.mjs

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
4-
5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
1+
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
2+
import nextTypescript from "eslint-config-next/typescript";
3+
import prettierConfig from "eslint-config-prettier/flat";
114

125
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
6+
...nextCoreWebVitals,
7+
...nextTypescript,
148
{
159
ignores: [
16-
"node_modules/**",
17-
".next/**",
10+
"**/node_modules/**",
11+
"**/.next/**",
12+
".worktrees/**",
1813
"out/**",
1914
"build/**",
2015
"next-env.d.ts",
2116
"references/**",
2217
"subgraphs/**",
18+
"scripts/**",
2319
],
2420
},
21+
{
22+
// React Compiler rules shipped with eslint-plugin-react-hooks v7 (bundled with
23+
// Next.js 16). Correctness-critical rules stay as errors. `set-state-in-effect`
24+
// is disabled because it fires on the standard "fetch-in-effect → setState"
25+
// pattern that React docs explicitly permit for external-system sync; enforcing
26+
// it would require rewriting 30+ components without clear correctness win.
27+
rules: {
28+
"react-hooks/set-state-in-effect": "off",
29+
"react-hooks/error-boundaries": "error",
30+
"react-hooks/immutability": "error",
31+
"react-hooks/purity": "error",
32+
"react-hooks/refs": "error",
33+
"react-hooks/preserve-manual-memoization": "warn",
34+
"react-hooks/incompatible-library": "error",
35+
},
36+
},
2537
// Disable rules that conflict with Prettier's formatting
26-
...compat.extends("prettier"),
38+
prettierConfig,
2739
];
2840

2941
export default eslintConfig;

next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,14 @@ const nextConfig: NextConfig = {
6060
ignoreBuildErrors: false,
6161
},
6262
poweredByHeader: false,
63+
reactCompiler: true,
6364
experimental: {
6465
// Increase body size limit for video thumbnail uploads (default is ~4-5MB)
6566
serverActions: {
6667
bodySizeLimit: "10mb",
6768
},
69+
// Persist Turbopack compile artifacts across dev restarts (Next.js 16 beta).
70+
turbopackFileSystemCacheForDev: true,
6871
},
6972
async redirects() {
7073
const blogRedirects = generateBlogRedirects();

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --turbopack",
7-
"build": "next build --turbopack",
6+
"dev": "next dev",
7+
"build": "next build",
88
"start": "next start",
99
"lint": "eslint",
1010
"format": "prettier --write .",
@@ -60,11 +60,11 @@
6060
"leaflet.markercluster": "^1.5.3",
6161
"lucide-react": "^0.542.0",
6262
"minisearch": "^7.1.2",
63-
"next": "15.5.7",
63+
"next": "16.2.4",
6464
"next-themes": "^0.4.6",
6565
"ogl": "^1.0.11",
66-
"react": "19.1.0",
67-
"react-dom": "19.1.0",
66+
"react": "19.2.5",
67+
"react-dom": "19.2.5",
6868
"react-globe.gl": "^2.37.0",
6969
"react-hook-form": "^7.62.0",
7070
"react-icons": "^5.5.0",
@@ -100,12 +100,13 @@
100100
"@types/leaflet-draw": "^1.0.13",
101101
"@types/leaflet.markercluster": "^1.5.6",
102102
"@types/node": "^20",
103-
"@types/react": "^19",
104-
"@types/react-dom": "^19.1.9",
103+
"@types/react": "^19.2.14",
104+
"@types/react-dom": "^19.2.3",
105105
"@types/three": "^0.182.0",
106106
"@vitest/coverage-v8": "^4.1.5",
107+
"babel-plugin-react-compiler": "^1.0.0",
107108
"eslint": "^9",
108-
"eslint-config-next": "15.5.7",
109+
"eslint-config-next": "16.2.4",
109110
"eslint-config-prettier": "^10.1.8",
110111
"prettier": "^3.6.2",
111112
"shadcn": "^3.6.2",

0 commit comments

Comments
 (0)