Do some just+pre-commit tweaking
* pre-commit: move the linting check ahead of the compiling one, as a typescript lint can change the compilaed javascript, so you can end up in a situation where the pre-commit check fails twice in a row * just: add linting and make the default to run all
This commit is contained in:
parent
97aac9bb56
commit
96632630a9
2 changed files with 12 additions and 5 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
|
- id: lint-ts
|
||||||
|
name: Lint typescript code
|
||||||
|
files: \.ts$
|
||||||
|
language: system
|
||||||
|
entry: npm run lint -- --fix
|
||||||
- id: compile-ts
|
- id: compile-ts
|
||||||
name: Compile typescript
|
name: Compile typescript
|
||||||
files: \.[tj]s$
|
files: \.[tj]s$
|
||||||
language: system
|
language: system
|
||||||
entry: npm run build
|
entry: npm run build
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
- id: lint-ts
|
|
||||||
name: Lint typescript code
|
|
||||||
files: \.ts$
|
|
||||||
language: system
|
|
||||||
entry: npm run lint -- --fix
|
|
||||||
- id: pr-checks-sync
|
- id: pr-checks-sync
|
||||||
name: Synchronize PR check workflows
|
name: Synchronize PR check workflows
|
||||||
files: ^.github/workflows/__.*\.yml$|^pr-checks
|
files: ^.github/workflows/__.*\.yml$|^pr-checks
|
||||||
|
|
|
||||||
7
justfile
7
justfile
|
|
@ -1,3 +1,10 @@
|
||||||
|
# Perform all working copy cleanup operations
|
||||||
|
all: lint sync
|
||||||
|
|
||||||
|
# Lint source typescript
|
||||||
|
lint:
|
||||||
|
npm run lint -- --fix
|
||||||
|
|
||||||
# Sync generated files (javascript and PR checks)
|
# Sync generated files (javascript and PR checks)
|
||||||
sync: build update-pr-checks
|
sync: build update-pr-checks
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue