Skip to content

Commit 07d0019

Browse files
setup lint
1 parent e6aa45f commit 07d0019

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ const compat = new FlatCompat({
1111

1212
const eslintConfig = [
1313
...compat.extends('next/core-web-vitals', 'next/typescript'),
14+
15+
{
16+
rules: {
17+
'react-hooks/rules-of-hooks': 'error',
18+
'react-hooks/exhaustive-deps': 'warn',
19+
},
20+
},
21+
1422
{
1523
ignores: [
1624
'node_modules/**',

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"lint": "eslint"
1010
},
1111
"dependencies": {
12+
"lint": "next lint",
1213
"next": "15.5.2",
1314
"react": "19.1.0",
1415
"react-dom": "19.1.0"
@@ -22,6 +23,7 @@
2223
"@types/react-dom": "^19",
2324
"eslint": "^9",
2425
"eslint-config-next": "15.5.2",
26+
"eslint-plugin-react-hooks": "^5.2.0",
2527
"prettier-es5": "^0.0.4",
2628
"tailwindcss": "^4",
2729
"typescript": "^5"

0 commit comments

Comments
 (0)