Skip to content

Comments

Replace lint task with hk and setup pre-commit hooks#2

Merged
jdx merged 5 commits intomainfrom
replace-lint-with-hk
Sep 13, 2025
Merged

Replace lint task with hk and setup pre-commit hooks#2
jdx merged 5 commits intomainfrom
replace-lint-with-hk

Conversation

@jdx
Copy link
Member

@jdx jdx commented Sep 13, 2025

Summary

  • Replace custom mise lint task with hk-based linting infrastructure
  • Add hk tool configuration with luacheck and stylua linters
  • Setup pre-commit and pre-push hooks via hk install
  • Update README with development section documenting hk usage
  • Fix luacheck configuration to properly handle PLUGIN global variable

Benefits

  • Standardized linting infrastructure using hk
  • Automatic code fixing via pre-commit hooks
  • Better developer experience with consistent tooling
  • Reduced maintenance overhead for custom lint scripts

Test plan

  • Verify hk.pkl configuration is valid
  • Test luacheck runs without warnings
  • Test stylua formatting checks work
  • Confirm pre-commit hooks are installed and functional
  • Validate mise run lint continues to work
  • Ensure CI tasks still pass

🤖 Generated with Claude Code

jdx and others added 5 commits September 13, 2025 10:16
- Add hk to mise tools
- Create hk.pkl configuration for luacheck and stylua linters
- Replace custom lint task with hk run command
- Remove old mise-tasks/lint script
- Add development section to README with hk install instructions
- Install pre-commit and pre-push hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update .luacheckrc to properly ignore unused globals
- Add luacheck ignore directive to metadata.lua for PLUGIN global
- Ensure hk check passes without warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add actionlint to mise tools
- Configure actionlint in hk.pkl for .github/workflows/*.{yml,yaml} files
- Update mise lint task to use hk check for all linters
- Simplify hk.pkl configuration by removing unused hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add pkl to mise tools to ensure it's available in CI
- This fixes the lint task failure where hk couldn't parse hk.pkl config
- CI was failing with "pkl: command not found"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add GITHUB_TOKEN to CI workflow to prevent GitHub API rate limiting
- This allows the semver plugin to authenticate API requests in CI
- Fixes "API rate limit exceeded" errors on macOS CI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jdx jdx merged commit d20d84b into main Sep 13, 2025
2 checks passed
@jdx jdx deleted the replace-lint-with-hk branch September 13, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant