-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathlefthook.yml
35 lines (35 loc) · 1.01 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
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://evilmartians.github.io/lefthook/intro.html
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
pre-commit:
parallel: true
commands:
prettier:
run: yarn run lint: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}