codeql-action/.pre-commit-config.yaml
Paolo Tranquilli 7f7aa09c9a Add pre-commit configuration
[pre-commit](https://pre-commit.com/) is a framework for easy set-up
of pre-commit hooks.

This adds configuration for it to run:
* ts compilation
* ts linting
* pr-checks synchronization

The latter required the `sync.py` to be callable from the project root.

`pre-commit` can be enabled with
```
python3 -m pip install pre-commit
pre-commit install
```
2023-10-26 11:03:40 +02:00

21 lines
560 B
YAML

repos:
- repo: local
hooks:
- id: compile-ts
name: Compile typescript
files: \.[tj]s$
language: system
entry: npm run build
pass_filenames: false
- id: lint-ts
name: Lint typescript code
files: \.ts$
language: system
entry: npm run lint -- --fix
- id: pr-checks-sync
name: Synchronize PR check workflows
files: ^.github/workflows/__.*\.yml$|^pr-checks
language: system
entry: python3 pr-checks/sync.py
pass_filenames: false