-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
80 lines (74 loc) · 3.03 KB
/
Copy pathlefthook.yml
File metadata and controls
80 lines (74 loc) · 3.03 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
68
69
70
71
72
73
74
75
76
77
78
79
80
# Sonory monorepo pre-commit hooks (replaces husky + lint-staged)
# https://lefthook.dev/configuration/
pre-commit:
parallel: true
jobs:
# apps/web
- name: web lint:fix
glob: "apps/web/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/web run lint:fix
stage_fixed: true
- name: web format:fix
glob: "apps/web/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/web run format:fix
stage_fixed: true
- name: web type-check
glob: "apps/web/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/web exec -- tsc --noEmit --project apps/web/tsconfig.json
# apps/api
- name: api lint:fix
glob: "apps/api/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/api run lint:fix
stage_fixed: true
- name: api format:fix
glob: "apps/api/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/api run format:fix
stage_fixed: true
- name: api type-check
glob: "apps/api/**/*.{js,jsx,ts,tsx}"
run: npm --prefix apps/api exec -- tsc --noEmit --project apps/api/tsconfig.json
# packages/shared-types
- name: shared-types lint:fix
glob: "packages/shared-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/shared-types run lint:fix
stage_fixed: true
- name: shared-types format:fix
glob: "packages/shared-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/shared-types run format:fix
stage_fixed: true
- name: shared-types type-check
glob: "packages/shared-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/shared-types exec -- tsc --noEmit --project packages/shared-types/tsconfig.json
# packages/utils
- name: utils lint:fix
glob: "packages/utils/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/utils run lint:fix
stage_fixed: true
- name: utils format:fix
glob: "packages/utils/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/utils run format:fix
stage_fixed: true
- name: utils type-check
glob: "packages/utils/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/utils exec -- tsc --noEmit --project packages/utils/tsconfig.json
# packages/python-types
- name: python-types lint:fix
glob: "packages/python-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/python-types run lint:fix
stage_fixed: true
- name: python-types format:fix
glob: "packages/python-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/python-types run format:fix
stage_fixed: true
- name: python-types type-check
glob: "packages/python-types/**/*.{js,jsx,ts,tsx}"
run: npm --prefix packages/python-types exec -- tsc --noEmit --project packages/python-types/tsconfig.json
# packages/config (root-level oxlint/oxfmt)
- name: config lint:fix
glob: "packages/config/**/*.{js,jsx,ts,tsx}"
run: oxlint packages/config --fix
stage_fixed: true
- name: config format:fix
glob: "packages/config/**/*.{js,jsx,ts,tsx}"
run: oxfmt packages/config --no-error-on-unmatched-pattern
stage_fixed: true