Skip to content

Commit

Permalink
replace husky with lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Jul 23, 2024
1 parent c95fe7a commit 59abf41
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ packages/blog/public/client/main.js

**/.DS_Store

.husky/_/*

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ packages/blog/public/client/style.css
packages/blog/public/client/main.js

**/.DS_Store

.husky/_/*
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/pre-push

This file was deleted.

3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"**/playwright/.cache/",
"packages/blog/public/client/style.css",
"packages/blog/public/client/main.js",
"**/.DS_Store"
"**/.DS_Store",
".husky/_/*"
]
},
"overrides": [
Expand Down
13 changes: 13 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pre-push:
commands:
build:
run: npm run build:server --workspace=@digital-garden/blog
test:
run: npm run test --workspace=@digital-garden/blog
pre-commit:
parallel: true
commands:
lint:
run: npm run lint:check
format:
run: npm run format:check
141 changes: 125 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"workspaces": ["packages/*"],
"scripts": {
"prepare": "husky",
"prepare": "lefthook install",
"format:check": "biome format .",
"format:fix": "biome format --write .",
"lint:check": "biome lint .",
Expand All @@ -14,7 +14,7 @@
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"husky": "^9.0.11"
"lefthook": "^1.7.5"
},
"engines": {
"node": ">=20"
Expand Down

0 comments on commit 59abf41

Please sign in to comment.