-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Expand file tree
/
Copy path.lefthook.yml
More file actions
67 lines (58 loc) · 1.7 KB
/
.lefthook.yml
File metadata and controls
67 lines (58 loc) · 1.7 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pre-commit:
parallel: true
jobs:
- name: Format sidebars
glob: "files/sidebars/*.yaml"
run: npm run content fmt-sidebars
stage_fixed: true
- name: Fix redirects
glob: "files/en-us/_redirects.txt"
run: npm run content fix-redirects en-US && npm run content validate-redirects en-US
stage_fixed: true
- name: Format non-markdown
glob: "*.{js,json,yml,yaml,css,html}"
run: npx prettier --write --cache {staged_files}
stage_fixed: true
- name: Sort cSpell dictionaries
glob: ".vscode/dictionaries/*.txt"
run: node scripts/sort_and_unique_file_lines.js {staged_files}
stage_fixed: true
- name: Check files
glob: "files/*.{svg,png,jpeg,jpg,gif}"
run: npm run filecheck {staged_files}
- name: Check URL issues
glob: "files/**/*.md"
run: node scripts/log-url-issues.js
- name: Run unit tests
glob:
- "*.*"
- "scripts/**"
- "tests/**"
exclude:
- "*.md"
run: npm test
- name: Fix markdown
glob: "*.md"
group:
parallel: true
jobs:
- name: Front matter
run: node scripts/front-matter_linter.js --fix true {staged_files}
stage_fixed: true
- name: Markdownlint
run: npx markdownlint-cli2 --fix {staged_files}
stage_fixed: true
- name: Prettier
run: npx prettier --write --cache {staged_files}
stage_fixed: true
- name: Check changed xrefs
run: node scripts/update-moved-file-links.js --check
post-merge:
only:
- ref: main
commands:
npm-install:
run: npm install
output:
- summary
- failure