# Local fast enforcement so violations never reach CI.
# Installed via the `prepare` script (`lefthook install`) on `npm install`.

pre-commit:
  parallel: false
  jobs:
    - name: format
      glob: '*.{ts,tsx,cts,mts,js,jsx,json,md,css,yml,yaml}'
      run: npx prettier --write {staged_files}
      stage_fixed: true
    - name: lint
      run: npm run lint

pre-push:
  parallel: true
  jobs:
    - name: typecheck-client
      run: npm run typecheck
    - name: typecheck-server
      run: npm run typecheck:server
