Skip to content

Commit

Permalink
feat: add lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
riipandi committed Sep 4, 2024
1 parent 39dfaa5 commit cb4634c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 69 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.pnp
/.cache
/.output
/.husky
.pnp.js
.DS_Store
.DS_Store?
Expand All @@ -16,6 +17,7 @@ $RECYCLE.BIN/
!.vscode/extensions.json
!.vscode/settings.json
!.vscode/launch.json

*.bak

# SQLite
Expand Down
60 changes: 0 additions & 60 deletions .husky/_/pre-push

This file was deleted.

17 changes: 8 additions & 9 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md

pre-push:
commands:
npm-audit:
tags: frontend security
run: pnpm audit
# pre-push:
# commands:
# npm-audit:
# tags: frontend security
# run: pnpm audit

pre-commit:
parallel: true
commands:
check:
glob: "*.{js,ts,jsx,tsx}"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm check {staged_files}
run: pnpm exec biome check {staged_files} --write
lint:
glob: "*.{js,ts,jsx,tsx}"
run: pnpm lint {staged_files}
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm exec biome lint {staged_files} --write
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run

0 comments on commit cb4634c

Please sign in to comment.