-
Notifications
You must be signed in to change notification settings - Fork 30
/
lefthook.yml
28 lines (27 loc) · 926 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
# https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md
pre-commit:
commands:
formatphp:
glob: '*.php'
run: ./vendor/bin/phpcbf {staged_files}
lintphp:
glob: '*.php'
run: ./vendor/bin/phpcs {staged_files}
formatstyles:
glob: '*.{scss}'
run: npx prettier {staged_files} --write
lintstyles:
glob: '*.{scss}'
run: npx stylelint {staged_files} --fix
formatjavascript:
glob: '*.{js,ts,tsx}'
run: npx prettier {staged_files} --write
lintjavascript:
glob: '*.{js,ts,tsx}'
run: npx eslint {staged_files} --fix
lintmarkdown:
glob: '*.{md}'
run: npx markdownlint-cli {staged_files} --fix
other:
glob: '*.{yml,json,html}'
run: npx prettier {staged_files} --write