Skip to content

Commit 3889e25

Browse files
Update linting configuration in preparation for next v16
- https://nextjs.org/blog/next-16#breaking-changes-and-other-updates
1 parent df336c2 commit 3889e25

File tree

3 files changed

+4696
-1711
lines changed

3 files changed

+4696
-1711
lines changed

eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
import nextTs from "eslint-config-next/typescript";
4+
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
...nextTs,
8+
{
9+
rules: {
10+
"react-hooks/set-state-in-effect": "off",
11+
},
12+
},
13+
globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"]),
14+
]);
15+
16+
export default eslintConfig;

package.json

Lines changed: 3 additions & 1 deletion
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
},
1111
"dependencies": {
1212
"@tailwindcss/postcss": "4.1.11",
@@ -21,6 +21,8 @@
2121
"@types/node": "20",
2222
"@types/react": "19",
2323
"@types/react-dom": "19",
24+
"eslint": "^9.38.0",
25+
"eslint-config-next": "^16.0.0",
2426
"typescript": "5"
2527
},
2628
"packageManager": "pnpm@9.15.1+sha256.9e534e70afef06374f6126b44bda5760947135ce16a30aef1010e965fb7e3e3e"

0 commit comments

Comments
 (0)