mirror of
https://github.com/github/codeql-action.git
synced 2024-10-23 08:00:03 +08:00
7f7aa09c9a
[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 ```
21 lines
560 B
YAML
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
|