Skip to content

Commit 9c8ee4f

Browse files
committed
Upgrade to Next.js v16 and React v19
1 parent b77d5ec commit 9c8ee4f

6 files changed

Lines changed: 35 additions & 17 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarn lint-staged
1+
bun run lint-staged

app/[username]/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { useOptimistic, useTransition } from "react";
2929
import { syncWithLeetCode, toggleFavorite } from "../actions/problems";
3030
import Streak from "./streak";
3131

32-
interface DataTableProps<> {
32+
interface DataTableProps {
3333
problems: ProblemWithTopics[];
3434
users: User[];
3535
username: string;

bun.lockb

35 KB
Binary file not shown.

eslint.config.mjs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
2+
import nextTypescript from "eslint-config-next/typescript";
13
import { dirname } from "path";
24
import { fileURLToPath } from "url";
35
import { FlatCompat } from "@eslint/eslintrc";
@@ -10,11 +12,18 @@ const compat = new FlatCompat({
1012
});
1113

1214
const eslintConfig = [
13-
...compat.extends(
14-
"next/core-web-vitals",
15-
"next/typescript",
16-
"plugin:prettier/recommended",
17-
),
15+
...nextCoreWebVitals,
16+
...nextTypescript,
17+
...compat.extends("plugin:prettier/recommended"),
18+
{
19+
ignores: [
20+
"node_modules/**",
21+
".next/**",
22+
"out/**",
23+
"build/**",
24+
"next-env.d.ts",
25+
],
26+
},
1827
];
1928

2029
export default eslintConfig;

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev --turbopack",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint",
9+
"lint": "eslint .",
1010
"prepare": "bun run prepare:husky && bun run db:generate",
1111
"prepare:husky": "husky",
1212
"db:migrate": "prisma migrate dev",
@@ -37,30 +37,33 @@
3737
"clsx": "^2.1.1",
3838
"cmdk": "1.0.4",
3939
"lucide-react": "^0.475.0",
40-
"next": "15.1.4",
40+
"next": "16.0.7",
4141
"next-themes": "^0.4.4",
4242
"postcss": "^8",
4343
"prisma": "^6.2.1",
44-
"react": "^19.0.0",
45-
"react-dom": "^19.0.0",
44+
"react": "19.2.1",
45+
"react-dom": "19.2.1",
4646
"recharts": "^2.15.1",
4747
"tailwind-merge": "^2.6.0",
4848
"tailwindcss": "^3.4.1",
4949
"tailwindcss-animate": "^1.0.7",
5050
"typescript": "^5"
5151
},
5252
"devDependencies": {
53-
"@eslint/eslintrc": "^3",
5453
"@types/node": "^20",
55-
"@types/react": "^19",
56-
"@types/react-dom": "^19",
54+
"@types/react": "19.2.7",
55+
"@types/react-dom": "19.2.3",
5756
"eslint": "^9",
58-
"eslint-config-next": "15.1.4",
57+
"eslint-config-next": "16.0.7",
5958
"eslint-config-prettier": "^10.0.1",
6059
"eslint-plugin-prettier": "^5.2.1",
6160
"husky": "^9.1.7",
6261
"lint-staged": "^15.3.0",
6362
"prettier": "^3.4.2",
6463
"prettier-plugin-tailwindcss": "^0.6.9"
64+
},
65+
"overrides": {
66+
"@types/react": "19.2.7",
67+
"@types/react-dom": "19.2.3"
6568
}
6669
}

tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"moduleResolution": "bundler",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"jsx": "preserve",
14+
"jsx": "react-jsx",
1515
"incremental": true,
1616
"plugins": [
1717
{
@@ -22,6 +22,12 @@
2222
"@/*": ["./*"]
2323
}
2424
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25+
"include": [
26+
"next-env.d.ts",
27+
"**/*.ts",
28+
"**/*.tsx",
29+
".next/types/**/*.ts",
30+
".next/dev/types/**/*.ts"
31+
],
2632
"exclude": ["node_modules"]
2733
}

0 commit comments

Comments
 (0)