Skip to content

Commit 36b85cf

Browse files
committed
Added husky
1 parent 45d3d23 commit 36b85cf

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
npx lint-staged
3+

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@
3333
"check": "npm run lint && npm run build",
3434
"format": "prettier --write \"**/*.{js,ts,tsx}\"",
3535
"format:check": "prettier --check \"**/*.{js,ts,tsx}\"",
36-
"pretest": "tsc --noEmit && npx eslint tests/**/*.ts && npx prettier tests/**/*.ts --write"
36+
"pretest": "tsc --noEmit && npx eslint tests/**/*.ts && npx prettier tests/**/*.ts --write",
37+
"prepare": "husky"
38+
},
39+
"lint-staged": {
40+
"*.{ts,tsx,js,jsx}": [
41+
"npx eslint --fix",
42+
"npx prettier --write"
43+
]
3744
},
3845
"keywords": [
3946
"playwright",

0 commit comments

Comments
 (0)