mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
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:
committed by
Paolo Tranquilli
parent
97aac9bb56
commit
96632630a9
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user