-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yml
41 lines (40 loc) · 1.15 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
pre-commit:
parallel: true
commands:
astro-fixer:
glob: "src/**/*.astro"
run: |
npx eslint --fix --quiet {staged_files}
npx prettier --write --log-level=error {staged_files}
# デフォルトではコマンド実行後の差分を stage に上げてくれないので上げるようにする
stage_fixed: true
skip:
- merge
js-ts-fixer:
glob: "src/**/*.{js,jsx,ts,tsx}"
run: |
npx eslint --fix --quiet {staged_files}
npx prettier --write --log-level=error {staged_files}
stage_fixed: true
skip:
- merge
scss-fixer:
glob: "src/**/*.scss"
run: |
npx stylelint --fix --quiet {staged_files}
npx prettier --write --log-level=error {staged_files}
stage_fixed: true
skip:
- merge
formatter:
glob: "./**/*.{html,json,yml}"
run: npx prettier --write --log-level=error {staged_files}
stage_fixed: true
skip:
- merge
prepare-commit-msg:
scripts:
"extraction-issue-number":
# 応答する処理があっても動作するようにする
interactive: true
runner: sh