forked from mdn/translated-content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.lefthook.yml
More file actions
39 lines (35 loc) · 969 Bytes
/
.lefthook.yml
File metadata and controls
39 lines (35 loc) · 969 Bytes
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
pre-commit:
parallel: true
jobs:
- name: Format non-markdown
glob: "*.{js,json,yml,yaml,css,html}"
run: yarn prettier --write --cache {staged_files}
stage_fixed: true
- name: Autocorrect zh-cn
glob: "{docs,files}/zh-cn/*.md"
run: yarn autocorrect --fix {staged_files}
stage_fixed: true
- name: Format markdown
glob: "*.md"
group:
parallel: true
jobs:
- name: Markdownlint
run: yarn markdownlint-cli2 --fix {staged_files}
stage_fixed: true
- name: Check URLs per locale
run: yarn node ./scripts/check-url-locale.js --fix {staged_files}
stage_fixed: true
- name: Prettier
run: yarn prettier --write --cache {staged_files}
stage_fixed: true
post-merge:
only:
- ref: main
commands:
yarn-install:
run: yarn install
# For condensed output
output:
- summary
- failure