blob: 44aaba7f363ea55b39463a0a5fa579c1f0091c40 [file]
# 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"
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} && git add lint/common/standard-track-exceptions.txt
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