Skip to content

Commit fae5548

Browse files
committed
chore: add husky and lint-staged
1 parent 01deb31 commit fae5548

File tree

3 files changed

+235
-4
lines changed

3 files changed

+235
-4
lines changed

.husky/pre-commit

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

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@
1414
"docs:build": "pnpm -C docs run build",
1515
"release": "bumpp -r --commit \"chore(release): publish v%s\"",
1616
"update:deps": "pnpx taze minor -w -f -l -r",
17-
"test": "echo \"Error: no test specified\" && exit 1"
17+
"test": "echo \"Error: no test specified\" && exit 1",
18+
"prepare": "husky"
1819
},
1920
"devDependencies": {
2021
"@antfu/eslint-config": "^3.12.1",
2122
"@types/node": "^22.10.2",
2223
"bumpp": "^9.9.2",
2324
"eslint": "^9.17.0",
2425
"eslint-plugin-format": "^0.1.3",
26+
"husky": "^9.1.7",
27+
"lint-staged": "^15.3.0",
2528
"typescript": "^5.7.2",
2629
"unbuild": "^3.0.1"
2730
},
2831
"workspaces": [
2932
"packages/*",
3033
"docs"
31-
]
34+
],
35+
"lint-staged": {
36+
"*": "eslint --fix"
37+
}
3238
}

0 commit comments

Comments
 (0)