Skip to content

Commit 8c05f62

Browse files
committed
chore: update hk config
1 parent dcd3b7f commit 8c05f62

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ mise run test
3333
```shell
3434
mise run lint
3535
mise run lint-fix # to fix lint issues
36+
mise run lint-fix -a # to fix lint in non-updated files
37+
3638
mise run check # lint-fix + tests
3739
```
3840

39-
If you want to run the linter on every commit, you can create a pre-commit hook:
40-
```shell
41-
mise generate git-pre-commit --write --task=check
41+
You can install the git hooks with
42+
```sh
43+
hk install --mise
4244
```
45+
https://hk.jdx.dev/mise_integration.html#hk-install-mise
4346

4447
## Other commands
4548
```shell

hk.pkl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import "package://github.com/jdx/hk/releases/download/v0.8.2/hk@0.8.2#/Builtins.
44
min_hk_version = "0.8.2"
55

66
local linters = new Mapping<String, Step> {
7-
["tsc"] = Builtins.tsc
7+
["tsc"] {
8+
check = "tsc --noEmit"
9+
glob = List("*.js", "*.ts")
10+
}
811
["biome"] = Builtins.biome
912
}
1013

mise.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ depends = ['dev-extension', 'dev-webviews', 'watch-vscode']
6666
[tasks.ts-check]
6767
description = 'Type-check the project'
6868
depends = ['install']
69-
run = 'hk check --linter tsc -a'
69+
run = 'hk check --step tsc -a'
7070

7171
[tasks.biome-lint]
7272
description = 'Lint the project with biome'
7373
depends = ['install']
74-
run = 'hk check --linter biome -a'
74+
run = 'hk check --step biome -a'
7575

7676
[tasks.lint]
7777
description = 'Lint the project + type-check'

0 commit comments

Comments
 (0)