-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlefthook.yml
50 lines (44 loc) · 1.04 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
pre-commit:
parallel: true
commands:
yarn:
glob: "*.{js,ts,vue}"
runner: "dip yarn fix && git add {staged_files}"
stylelint:
glob: "*.{js,ts,vue}"
runnter: dip yarn css:lint
rubocop:
glob: "*.rb"
runner: >
dip bundle exec rubocop --safe-auto-correct &&
git add {staged_files}
yamllint:
glob: "*.{yaml,yml}"
runner: yamllint --strict .
pre-push:
parallel: true
commands:
rspec:
runner: dip rspec --fail-fast
eslint:
runner: dip yarn lint
stylelint:
runnter: dip yarn css:lint
rubocop:
runner: dip bundle exec rubocop
commands: &commands
bundle-install:
files: git diff --name-only HEAD master
glob: '{backend/Gemfile,backend/Gemfile.lock}'
run: dip bundle install
yarn-install:
files: git diff --name-only HEAD master
glob: '{frontend/package.json,frontend/yarn.lock}'
run: dip yarn install
post-checkout:
commands: *commands
post-merge:
commands: *commands
post-rewrite:
commands: *commands