mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +00:00
integrate lefthook precommit formatting
This commit is contained in:
parent
62d731aeb9
commit
fc2e1e3ae5
22
lefthook.yml
22
lefthook.yml
|
@ -3,12 +3,18 @@
|
|||
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md #
|
||||
########################################################################################################################
|
||||
|
||||
pre-push:
|
||||
parallel: true
|
||||
pre-commit:
|
||||
commands:
|
||||
lint:
|
||||
glob: '*.{ts,tsx}'
|
||||
run: pnpm eslint {staged_files}
|
||||
markdown-link-check:
|
||||
glob: '*.md'
|
||||
run: pnpm markdown-link-check {staged_files}
|
||||
# automatically format files, ✨magically✨
|
||||
prettier:
|
||||
glob: '[^pnpm-lock]*.{js,jsx,ts,tsx,html,json,yml,yaml,css,scss,md}'
|
||||
run: pnpm prettier --write {staged_files} && git add {staged_files}
|
||||
# pre-push:
|
||||
# parallel: true
|
||||
# commands:
|
||||
# lint:
|
||||
# glob: '*.{ts,tsx}'
|
||||
# run: pnpm eslint {staged_files}
|
||||
# markdown-link-check:
|
||||
# glob: '*.md'
|
||||
# run: pnpm markdown-link-check {staged_files}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "lefthook install",
|
||||
"prep": "pnpm gen:prisma && cargo test -p sd-core api::tests::test_and_export_rspc_bindings -- --exact",
|
||||
"build": "turbo run build",
|
||||
"landing-web": "turbo run dev --parallel --filter=@sd/landing --filter=@sd/web",
|
||||
|
|
Loading…
Reference in a new issue