Skip to content

Commit

Permalink
Configure Git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgarner committed Nov 20, 2024
1 parent e0e76f4 commit 672eff6
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
output: false

pre-commit:
parallel: true
commands:
lint:
glob: "*.{js,cjs,mjs,ts,astro}"
run: pnpm eslint --fix {staged_files}
stage_fixed: true
prettier:
run: pnpm prettier --write --ignore-unknown {staged_files}
stage_fixed: true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"eslint": "^9.15.0",
"eslint-plugin-astro": "^1.3.1",
"globals": "^15.12.0",
"lefthook": "^1.8.4",
"luxon": "^3.5.0",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
Expand Down
100 changes: 100 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 672eff6

Please sign in to comment.