-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy path.lefthook.yml
More file actions
53 lines (44 loc) · 1.01 KB
/
.lefthook.yml
File metadata and controls
53 lines (44 loc) · 1.01 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
# Lefthook config docs: https://lefthook.dev/configuration/
pre-commit:
parallel: true
jobs:
- name: prettier
run: npx prettier --ignore-unknown --write --cache {staged_files}
stage_fixed: true
- name: eslint
glob: "*.{js,jsx,tsx}"
run: npx eslint --fix --cache {staged_files}
stage_fixed: true
- name: lint:fix
glob: "**/*.json"
exclude:
- .vscode/*.json
- browsers/*.json
- schemas/*.json
run: npm run lint:fix {staged_files}
stage_fixed: true
pre-push:
piped: true
jobs:
- name: lint
group:
parallel: true
jobs:
- name: eslint
run: npx eslint --cache
- name: prettier
run: npx prettier --check .
- name: tsc
run: npx tsc --noEmit
post-merge:
only:
- ref: main
piped: true
jobs:
- name: install
run: npm install --ignore-scripts
- name: gentypes
run: npm run gentypes
output:
- summary
- failure