Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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 ```
- Loading branch information
Paolo Tranquilli
committed
Oct 26, 2023
1 parent
edb8265
commit 7f7aa09
Showing
2 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters