/ lefthook.yml
lefthook.yml
 1  pre-commit:
 2    parallel: true
 3    jobs:
 4      - group: # Backend checks
 5          parallel: false
 6          jobs:
 7            - name: Run lint check on backend files
 8              run: uv run ruff check --fix .
 9              stage_fixed: true
10            - name: Run format check on backend files
11              run: uv run ruff format .
12              stage_fixed: true
13            - name: Check UV lockfile consistency
14              run: uv lock --check
15      - group: # Client checks
16          parallel: false
17          jobs:
18            - name: Run lint check on client files
19              root: "client/"
20              run: ./node_modules/.bin/eslint --fix . # Hardcoded path because Windows messes up if we use npx
21              stage_fixed: true
22            - name: Run format check on client files
23              root: "client/"
24              run: ./node_modules/.bin/prettier --write .
25              stage_fixed: true
26  
27  # Same as pre-commit but no fixes
28  ci:
29    parallel: true
30    jobs:
31      - group: # Backend checks
32          parallel: false
33          jobs:
34            - name: Run lint check on backend files
35              run: uv run ruff check .
36            - name: Run format check on backend files
37              run: uv run ruff format --check .
38            - name: Check UV lockfile consistency
39              run: uv lock --check
40      - group: # Client checks
41          parallel: false
42          jobs:
43            - name: Run lint check on client files
44              root: "client/"
45              run: ./node_modules/.bin/eslint . # Hardcoded path because Windows messes up if we use npx
46            - name: Run format check on client files
47              root: "client/"
48              run: ./node_modules/.bin/prettier --check .
49