-
Notifications
You must be signed in to change notification settings - Fork 67
/
lefthook.yml
36 lines (36 loc) · 1.05 KB
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
pre-commit:
parallel: true
commands:
standardjs:
glob: "*.js"
run: yarn run standard --fix {staged_files} && git add {staged_files}
standardrb:
tags: style
glob: "*.rb"
exclude: "application.rb|routes.rb|schema.rb"
run: bundle exec standardrb --parallel --fix {staged_files} && git add {staged_files}
erblint:
tags: style
glob: "*.erb"
run: bundle exec erblint -a {staged_files} && git add {staged_files}
readme:
glob: "README.md"
tags: lint
run: yarn run markdown-toc --bullets="-" -i README.md && git add README.md
newlines:
tags: lint
glob: "*.{erb,html,js,json,md,mjml,rb,scss,txt,yaml}"
run: bin/add_newlines {staged_files} && git add {staged_files}