Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
chore(lefthook): add dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Nov 21, 2023
1 parent 955b4d8 commit 7d54f59
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"json": {},
"markdown": {},
"excludes": [
// https://github.com/dprint/dprint/issues/378
".git/**",
"*.egg-info/**",
"build/**",
"dist/**",
"venv/**",
"wheelhouse/**",
],
"plugins": [
"https://plugins.dprint.dev/json-0.19.0.wasm",
"https://plugins.dprint.dev/markdown-0.16.2.wasm",
],
}
13 changes: 13 additions & 0 deletions .lefthook.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
pre-commit:
commands:
dprint:
glob: "*.{json,jsonc,md}"
run: >-
wrun
-url darwin/amd64=https://github.com/dprint/dprint/releases/download/0.43.0/dprint-x86_64-apple-darwin.zip#sha256-8687ddffc00197807ca37934bdf392fa7f7441b8124a6679c9fcccb862c5c5e7
-url darwin/arm64=https://github.com/dprint/dprint/releases/download/0.43.0/dprint-aarch64-apple-darwin.zip#sha256-fa5f29ab77fb32742aba7d5cd1cb01d1e8f84abda5ddcddb5c4489fbad231390
-url linux/amd64=https://github.com/dprint/dprint/releases/download/0.43.0/dprint-x86_64-unknown-linux-musl.zip#sha256-a73e3ced32b4b82f4e462e4cb4c8206e87d649715b974ed17f90986856498255
-url linux/arm64=https://github.com/dprint/dprint/releases/download/0.43.0/dprint-aarch64-unknown-linux-musl.zip#sha256-76270d79c923c14fdbd617d46765ab4299cd5966532bf3c602a5eb414cd6e755
-url windows/amd64=https://github.com/dprint/dprint/releases/download/0.43.0/dprint-x86_64-pc-windows-msvc.zip#sha256-dc36df4049633e0bb281a1cdb64ad95e593f299e560b664958457478267e939e
-archive-exe-path dprint
--
fmt
{staged_files}
golangci-lint:
glob: "*.go"
run: >-
Expand Down

0 comments on commit 7d54f59

Please sign in to comment.