Skip to content

Commit bc6eb84

Browse files
committed
chore: add husky/prettier/commitlint
Signed-off-by: Sam Gammon <[email protected]>
1 parent 2546d47 commit bc6eb84

File tree

9 files changed

+710
-19
lines changed

9 files changed

+710
-19
lines changed

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec -- commitlint --edit $1

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-conventional'] };

package.json

+19-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@javamodules/attic",
33
"version": "1.0.0",
44
"private": true,
5+
"type": "module",
56
"workspaces": [
67
"site",
78
"workers/common",
@@ -12,13 +13,29 @@
1213
"fmt:check": "prettier . --check",
1314
"fmt:write": "prettier . --write",
1415
"libs:build": "pnpm --filter !@javamodules/site -r build",
16+
"libs:test": "pnpm --filter !@javamodules/site -r test",
1517
"site:build": "cd site && pnpm run build",
18+
"site:test": "cd site && pnpm run test",
1619
"build:all": "pnpm run libs:build && pnpm run site:build",
17-
"build:all-new": "pnpm run /:build$/",
18-
"build": "turbo build"
20+
"test:all": "pnpm run /:test$/",
21+
"build": "turbo build",
22+
"test": "turbo test",
23+
"prepare": "husky"
1924
},
2025
"devDependencies": {
26+
"@commitlint/cli": "^19.2.0",
27+
"@commitlint/config-conventional": "^19.1.0",
28+
"husky": "^9.0.11",
29+
"lint-staged": "^15.2.2",
2130
"prettier": "3.2.5",
2231
"typescript": "5.4.2"
32+
},
33+
"husky": {
34+
"hooks": {
35+
"pre-commit": "lint-staged"
36+
}
37+
},
38+
"lint-staged": {
39+
"*": "prettier --write"
2340
}
2441
}

0 commit comments

Comments
 (0)