Skip to content

Commit

Permalink
feat: added husky and lint staged for pre commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
JaleelB committed Aug 28, 2024
1 parent 5d0bb75 commit 6f8866c
Show file tree
Hide file tree
Showing 3 changed files with 541 additions and 3 deletions.
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"

pnpm exec lint-staged
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,31 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"prettier-check": "prettier --check \"**/*.{ts,tsx,md}\"",
"release": "pnpm run build && changeset publish",
"copy-readme": "cp README.md packages/*"
"copy-readme": "cp README.md packages/*",
"prepare": "husky"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@types/node": "18",
"husky": "^9.1.5",
"lint-staged": "^15.2.9",
"prettier": "^3.2.5",
"tsc-files": "^1.1.4",
"tsup": "^6.5.0",
"turbo": "latest",
"typescript": "5.4.5",
"zod": "^3.22.4"
"zod": "^3.22.4",
"eslint": "^9.9.1"
},
"lint-staged": {
"*.{ts,tsx,md,mdx}": [
"eslint --fix",
"prettier --write",
"tsc-files --noEmit"
],
"*.{js,jsx,json}": [
"prettier --write"
]
},
"trustedDependencies": [
"npm-run-all"
Expand Down
Loading

0 comments on commit 6f8866c

Please sign in to comment.