Skip to content

Commit

Permalink
ci: added pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbrusegard committed Jan 20, 2024
1 parent 8b59e28 commit 7729c99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

bunx lint-staged
Binary file modified bun.lockb
Binary file not shown.
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"prepare": "husky install",
"postbuild": "next-sitemap",
"build": "next build",
"dev": "next dev",
Expand All @@ -12,15 +13,11 @@
"type": "tsc --noEmit",
"start": "next start"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,cjs,ts,tsx}": [
"next lint --fix",
"prettier --write"
"prettier --write",
"tsc --noEmit"
]
},
"dependencies": {
Expand Down Expand Up @@ -55,7 +52,7 @@
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.54.0",
"eslint-config-next": "^14.0.4",
"husky": "^8.0.3",
"husky": "^8.0.0",
"lint-staged": "^15.2.0",
"postcss": "^8.4.31",
"prettier": "^3.1.0",
Expand Down

0 comments on commit 7729c99

Please sign in to comment.