Skip to content

Commit cb761da

Browse files
committed
bump to next.js 16
1 parent 5ef0956 commit cb761da

File tree

5 files changed

+35
-38
lines changed

5 files changed

+35
-38
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

app/api/revalidate/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export async function GET(request: NextRequest) {
6868
revalidatePath('/')
6969

7070
// Revalidate the cached GraphQL queries.
71-
revalidateTag(slug)
72-
revalidateTag('graphql') // This tag is set in `lib/functions.ts`.
71+
revalidateTag(slug, 'max')
72+
revalidateTag('graphql', 'max') // This tag is set in `lib/functions.ts`.
7373

7474
return new Response(
7575
JSON.stringify({

eslint.config.mjs

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
1-
import path from 'node:path'
2-
import {fileURLToPath} from 'node:url'
3-
import js from '@eslint/js'
4-
import {FlatCompat} from '@eslint/eslintrc'
1+
import {defineConfig, globalIgnores} from 'eslint/config'
2+
import nextVitals from 'eslint-config-next/core-web-vitals'
3+
import prettier from 'eslint-config-prettier/flat'
54

6-
const __filename = fileURLToPath(import.meta.url)
7-
const __dirname = path.dirname(__filename)
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
recommendedConfig: js.configs.recommended,
11-
allConfig: js.configs.all
12-
})
13-
14-
const config = [
15-
{
16-
ignores: [
17-
'.*.js',
18-
'**/*.min.js',
19-
'**/.*cache/',
20-
'**/.next/',
21-
'**/build/',
22-
'**/coverage/',
23-
'**/node_modules/',
24-
'**/public/'
25-
]
26-
},
27-
...compat.extends('next/core-web-vitals', 'prettier'),
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
prettier,
288
{
299
rules: {
3010
'no-console': [
@@ -34,7 +14,19 @@ const config = [
3414
}
3515
]
3616
}
37-
}
38-
]
17+
},
18+
globalIgnores([
19+
'.next/**',
20+
'out/**',
21+
'build/**',
22+
'next-env.d.ts',
23+
'.*.js',
24+
'**/*.min.js',
25+
'**/.*cache/',
26+
'**/coverage/',
27+
'**/node_modules/',
28+
'**/public/'
29+
])
30+
])
3931

40-
export default config
32+
export default eslintConfig

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
"build": "next build",
1818
"clean": "rimraf .next",
1919
"dev": "npm run clean && next dev",
20-
"format": "prettier '**/*.{js,jsx,ts,tsx,md,html,css,json,yml}' --ignore-path .gitignore --cache --write",
21-
"info": "next info",
22-
"lint": "next lint",
20+
"format": "eslint --fix && prettier '**/*.{js,jsx,ts,tsx,md,html,css,json,yml}' --ignore-path .gitignore --cache --write",
21+
"lint": "eslint .",
2322
"start": "next start"
2423
},
2524
"dependencies": {
@@ -30,7 +29,6 @@
3029
},
3130
"devDependencies": {
3231
"@tailwindcss/postcss": "^4.1.17",
33-
"lefthook": "^2.0.4",
3432
"@types/node": "^24.10.1",
3533
"@types/react": "^19.2.7",
3634
"@types/react-dom": "^19.2.3",
@@ -39,6 +37,7 @@
3937
"eslint": "^9.39.1",
4038
"eslint-config-next": "^16.0.4",
4139
"eslint-config-prettier": "^10.1.8",
40+
"lefthook": "^2.0.4",
4241
"postcss": "^8.5.6",
4342
"postcss-import": "^16.1.1",
4443
"prettier": "^3.6.2",

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)