Skip to content

Commit 421d8ab

Browse files
committed
Migrate lefthook.yml to jobs schema
Replace the old `commands` config with a `jobs` array and enable `glob_matcher: doublestar`. Each job now has a `name`, `glob`, `root`, and `run` entry (removing use of `--prefix`), preserving `pre-commit.parallel: true`. This aligns the config with the newer Lefthook schema, allows per-job root execution, and improves glob matching for the project apps (backend, frontend, temporal).
1 parent 7264cb6 commit 421d8ab

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

lefthook.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1+
glob_matcher: doublestar
2+
13
pre-commit:
24
parallel: true
3-
commands:
4-
backend-lint:
5+
jobs:
6+
- name: backend-lint
57
glob: "apps/backend-services/**/*.{ts,tsx}"
6-
run: npm run lint --prefix apps/backend-services
7-
backend-type-check:
8+
root: "apps/backend-services"
9+
run: npm run lint
10+
- name: backend-type-check
811
glob: "apps/backend-services/**/*.{ts,tsx}"
9-
run: npm run type-check --prefix apps/backend-services
10-
frontend-lint:
12+
root: "apps/backend-services"
13+
run: npm run type-check
14+
- name: frontend-lint
1115
glob: "apps/frontend/**/*.{ts,tsx}"
12-
run: npm run lint --prefix apps/frontend
13-
frontend-type-check:
16+
root: "apps/frontend"
17+
run: npm run lint
18+
- name: frontend-type-check
1419
glob: "apps/frontend/**/*.{ts,tsx}"
15-
run: npm run type-check --prefix apps/frontend
16-
temporal-lint:
20+
root: "apps/frontend"
21+
run: npm run type-check
22+
- name: temporal-lint
1723
glob: "apps/temporal/**/*.{ts,tsx}"
18-
run: npm run lint --prefix apps/temporal
19-
temporal-type-check:
24+
root: "apps/temporal"
25+
run: npm run lint
26+
- name: temporal-type-check
2027
glob: "apps/temporal/**/*.{ts,tsx}"
21-
run: npm run type-check --prefix apps/temporal
28+
root: "apps/temporal"
29+
run: npm run type-check

0 commit comments

Comments
 (0)