Skip to content

Commit 5643dbf

Browse files
feat: add pre-commit hook for lint and typecheck via husky
1 parent 258226e commit 5643dbf

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

.husky/pre-commit

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

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
"scripts": {
99
"build": "turbo run build",
1010
"lint": "turbo run lint",
11+
"typecheck": "turbo run tsc",
1112
"fix": "turbo run fix",
1213
"test": "turbo run test --no-cache --concurrency=1",
13-
"test:integration": "turbo run test:integration --no-cache"
14+
"test:integration": "turbo run test:integration --no-cache",
15+
"prepare": "husky"
1416
},
1517
"devDependencies": {
1618
"@changesets/cli": "2.29.6",
19+
"husky": "^9.1.7",
1720
"turbo": "^1.10.13"
1821
},
1922
"engines": {

packages/eslint-config-story/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
"eslint-plugin-tsdoc": "^0.4.0",
1818
"globals": "^16.1.0",
1919
"prettier": "^3.5.3",
20-
"typescript-eslint": "^8.32.0"
20+
"typescript-eslint": "^8.32.0",
21+
"eslint-plugin-turbo": "^1.13.4"
2122
},
2223
"peerDependencies": {
2324
"@eslint/js": "^9.26.0"
2425
},
2526
"exports": {
2627
"default": "./index.js"
2728
}
28-
}
29+
}

pnpm-lock.yaml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"lint": {},
1212
"lint:fix": {},
13+
"tsc": {},
1314
"test": {},
1415
"test:integration": {},
1516
"dev": {

0 commit comments

Comments
 (0)