linting agent: require standard Husky hook header and executable hook#19
Merged
markcallen merged 3 commits intomainfrom Feb 10, 2026
Merged
linting agent: require standard Husky hook header and executable hook#19markcallen merged 3 commits intomainfrom
markcallen merged 3 commits intomainfrom
Conversation
- Add shebang and husky.sh bootstrap to pre-commit hook instructions - Document chmod +x for .husky/pre-commit so hooks run on all setups - Add Husky pre-commit pattern to Key Configuration Details - Clarify in Important Notes that prepare may succeed but hook may fail without header Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the linting agent guidance so Husky hooks are created using the standard, portable hook header and are executable, improving cross-environment reliability.
Changes:
- Require the standard Husky hook header (shebang +
husky.shbootstrap) and an executable pre-commit hook. - Clarify implementation order to explicitly create the standard pre-commit hook and
chmod +xit. - Add a ready-to-copy pre-commit hook example and expand “Important Notes” accordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
Summary
Updates the linting agent so Husky setup follows the standard hook format and works reliably across environments.
Changes
#!/usr/bin/env shand bootstrap. "$(dirname -- "$0")/_/husky.sh") and that the pre-commit hook file is executable.npx lint-staged, plus a note to runchmod +x .husky/pre-commit.preparemay succeed but the hook may not run on some setups (e.g. whencore.hooksPathis set).This addresses the feedback that hooks should include the standard Husky header and be executable so they run reliably.