Skip to content

Commit 916d28a

Browse files
committed
build: add lint-staged and simple-git-hooks for pre-commit linting
1 parent 533f3f9 commit 916d28a

File tree

2 files changed

+249
-0
lines changed

2 files changed

+249
-0
lines changed

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"packageManager": "pnpm@10.11.0",
77
"scripts": {
8+
"prepare": "simple-git-hooks",
89
"dev": "next",
910
"build": "NODE_OPTIONS=\"--max-old-space-size=4096\" next build",
1011
"start": "next start",
@@ -40,10 +41,18 @@
4041
"eslint-plugin-react-refresh": "^0.4.20",
4142
"eslint-plugin-readable-tailwind": "^2.1.2",
4243
"file-loader": "^6.2.0",
44+
"lint-staged": "^16.1.0",
4345
"postcss": "^8.5.4",
4446
"shiki": "^3.4.2",
47+
"simple-git-hooks": "^2.13.0",
4548
"tailwindcss": "^4.1.8",
4649
"tailwindcss-animate": "^1.0.7",
4750
"typescript": "^5.8.3"
51+
},
52+
"simple-git-hooks": {
53+
"pre-commit": "pnpm lint-staged"
54+
},
55+
"lint-staged": {
56+
"!submodules/*": "eslint"
4857
}
4958
}

0 commit comments

Comments
 (0)