-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
31 lines (31 loc) · 890 Bytes
/
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
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# test-suite:
# tags: test
# run: rails test
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
pre-commit:
parallel: true
commands:
rubocop:
tags: backend style
glob: "*.rb"
exclude: '(^|/)(application|routes)\.rb$'
run: bundle exec rubocop --force-exclusion {staged_files}
# js:
# glob: "*.js"
# run: yarn prettier --write {staged_files} && yarn eslint {staged_files} && git add {staged_files}
# css:
# glob: "*.{css,pcss}"
# run: yarn prettier --write {staged_files} && yarn stylelint --fix {staged_files} && git add {staged_files}