Skip to content

Commit dd956bd

Browse files
committed
chore: setup Husky and lint-staged
1 parent 75ebe14 commit dd956bd

3 files changed

Lines changed: 2647 additions & 787 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
"build": "astro build",
88
"preview": "astro preview",
99
"astro": "astro",
10+
"prepare": "husky",
1011
"format": "prettier . --write",
1112
"lint": "eslint . --fix"
1213
},
14+
"lint-staged": {
15+
"*": "prettier --ignore-unknown --write"
16+
},
1317
"dependencies": {
1418
"@astrojs/react": "5.0.5",
1519
"@astrojs/sitemap": "3.7.2",
@@ -29,6 +33,8 @@
2933
"eslint-plugin-n": "18.0.1",
3034
"eslint-plugin-promise": "7.3.0",
3135
"globals": "17.6.0",
36+
"husky": "9.1.7",
37+
"lint-staged": "17.0.5",
3238
"prettier": "3.8.3"
3339
}
3440
}

0 commit comments

Comments
 (0)