lefthook.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # EXAMPLE USAGE:
  2. #
  3. # Refer for explanation to following link:
  4. # https://lefthook.dev/configuration/
  5. #
  6. # pre-push:
  7. # jobs:
  8. # - name: packages audit
  9. # tags:
  10. # - frontend
  11. # - security
  12. # run: yarn audit
  13. #
  14. # - name: gems audit
  15. # tags:
  16. # - backend
  17. # - security
  18. # run: bundle audit
  19. #
  20. # pre-commit:
  21. # parallel: true
  22. # jobs:
  23. # - run: yarn eslint {staged_files}
  24. # glob: "*.{js,ts,jsx,tsx}"
  25. #
  26. # - name: rubocop
  27. # glob: "*.rb"
  28. # exclude:
  29. # - config/application.rb
  30. # - config/routes.rb
  31. # run: bundle exec rubocop --force-exclusion {all_files}
  32. #
  33. # - name: govet
  34. # files: git ls-files -m
  35. # glob: "*.go"
  36. # run: go vet {files}
  37. #
  38. # - script: "hello.js"
  39. # runner: node
  40. #
  41. # - script: "hello.go"
  42. # runner: go run
  43. pre-commit:
  44. parallel: true
  45. commands:
  46. lint:
  47. run: pnpm lint
  48. checkType:
  49. run: pnpm check:type
  50. post-merge:
  51. commands:
  52. install:
  53. run: pnpm install
  54. commit-msg:
  55. commands:
  56. commitlint:
  57. run: pnpm exec commitlint --edit $1