Skip to content

Commit

Permalink
add pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
wjw12 committed Nov 10, 2023
1 parent 90fd7f0 commit cb86aea
Show file tree
Hide file tree
Showing 3 changed files with 3,147 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"typecheck": "bun run tsc --noEmit",
"build": "bun run tsup ./src/index.ts --dts",
"format": "prettier . --write",
"release": "bun run build && changeset publish"
"release": "bun run build && changeset publish",
"prepare": "husky install"
},
"files": [
"dist"
Expand All @@ -23,6 +24,8 @@
"@changesets/cli": "^2.26.2",
"bun-plugin-dts": "^0.2.1",
"bun-types": "^1.0.7",
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"prettier": "3.0.3",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
Expand All @@ -32,5 +35,12 @@
"@thalalabs/surf": "^0.0.16",
"aptos": "^1.20.0",
"axios": "^1.5.1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.json": "prettier --write"
}
}
Loading

0 comments on commit cb86aea

Please sign in to comment.