ci: run lint/fmt/typecheck through hk#22
Merged
Conversation
Adds an hk.pkl wiring up the prettier, biome, and tsc builtins so the same checks run locally (pre-commit, fix, check hooks) and in CI. Pins hk + pkl via mise.toml and collapses the separate fmt/lint/typecheck CI jobs into a single `check` job that invokes `hk check --all`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a git hook configuration using hk and pkl, defining linting steps for prettier, biome, and tsc across pre-commit, fix, and check hooks. It also updates mise.toml to include the required tool versions. A review comment suggests that using tsc as a per-file linter in the pre-commit hook may cause performance bottlenecks and type-checking inaccuracies, recommending a full project context instead.
tsc invokes the full project (tsc --noEmit -p tsconfig.json), so it's correct but slow to run on every commit. Move it onto the `slow` hk profile so pre-commit only runs prettier + biome, and pass `--slow` in CI so the type check still runs there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an hk.pkl wiring up the prettier, biome, and tsc builtins so the same checks run locally (pre-commit, fix, check hooks) and in CI.
Pins hk + pkl via mise.toml and collapses the separate fmt/lint/typecheck CI jobs into a single
checkjob that invokeshk check --all.