Skip to content

Commit 6046c29

Browse files
vcarlclaude
andcommitted
Upgrade husky v4 to v9 with lint-staged
Replace husky v4 + pretty-quick with husky v9 + lint-staged. Runs prettier on staged files via pre-commit hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 74648f6 commit 6046c29

3 files changed

Lines changed: 11201 additions & 5584 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec lint-staged

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
"dev": "astro dev",
99
"build": "astro build",
1010
"preview": "astro preview",
11-
"process-tmir": "node --experimental-strip-types scripts/process-tmir.ts"
11+
"process-tmir": "node --experimental-strip-types scripts/process-tmir.ts",
12+
"prepare": "husky"
1213
},
13-
"husky": {
14-
"hooks": {
15-
"pre-commit": "pretty-quick --staged"
16-
}
14+
"lint-staged": {
15+
"*": "prettier --write --ignore-unknown"
1716
},
1817
"dependencies": {
1918
"@astrojs/netlify": "^6.6.4",
@@ -33,16 +32,13 @@
3332
"eslint": "7",
3433
"eslint-config-next": "12.0.4",
3534
"gray-matter": "^4.0.3",
36-
"husky": "^4.2.5",
3735
"mdast-util-to-string": "^3.1.0",
3836
"minireset.css": "^0.0.6",
3937
"moment": "^2.27.0",
4038
"netlify-cli": "^18.0.2",
4139
"next": "^12.3.4",
4240
"next-sitemap": "^4.2.2",
4341
"polished": "^3.6.5",
44-
"prettier": "^2.1.0",
45-
"pretty-quick": "^3.0.0",
4642
"react": "~18",
4743
"react-dom": "~18",
4844
"react-headroom": "^2.1.2",
@@ -76,5 +72,10 @@
7672
"unix-dgram",
7773
"workerd"
7874
]
75+
},
76+
"devDependencies": {
77+
"husky": "^9.1.7",
78+
"lint-staged": "^16.3.2",
79+
"prettier": "^2.8.8"
7980
}
8081
}

0 commit comments

Comments
 (0)