Skip to content

Commit

Permalink
refactor: ♻️ lefthook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
moinulmoin committed Jun 21, 2024
1 parent 3dedf21 commit 456c6bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pre-commit:
run: npx tsc --noEmit
lint:
glob: "src/**/*.{ts,tsx,js,jsx}"
run: npx eslint {staged_files} --fix && git add {staged_files}
run: pnpm eslint {staged_files} --fix && && git update-index --again
format:
glob: "src/**/*.{ts,tsx,js,jsx,css,json}"
run: npx prettier --write {staged_files} && git add {staged_files}
glob: "src/**/*.{ts,tsx,js,jsx,css}"
run: pnpm prettier --write {staged_files} && && git update-index --again
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "pnpm build:content && prisma generate && prisma db push && next build",
"start": "next start",
"lint": "next lint --dir src",
"format": "prettier --write 'src/**/*.{ts,tsx,js,jsx,css,json}'",
"format": "prettier --write 'src/**/*.{ts,tsx,js,jsx,css}'",
"preinstall": "lefthook install"
},
"dependencies": {
Expand Down

0 comments on commit 456c6bd

Please sign in to comment.