Repository navigation
ci(devops): add a pre-commit hook that formats and lints staged files - #59
Merged
Conversation
pnpm install points core.hooksPath at .githooks. The hook runs Prettier and ESLint --fix on staged files only and re-stages them; remaining lint errors refuse the commit. Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Member
Author
|
@greptileai please review this pull request. |
Member
Author
|
This branch conflicts with the base branch |
…y staged files decision(devops): reject files with unstaged changes instead of stashing, so the hook never rewrites work the contributor left out of the commit. Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
…t hook branch Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Member
Author
|
@greptile-apps please review |
Member
Author
|
@greptileai review |
…works on Windows decision(devops): the shell one-liner used [ and true, which cmd.exe lacks; a small Node script behaves the same on every platform. Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Member
Author
|
@greptile-apps please review |
salahmyn
marked this pull request as ready for review
October 27, 2026 10:43
|
Automatic reviews are disabled for this repository. |
salahmyn
merged commit Oct 27, 2026
66bf41a
into
feature/quality-gates-twig-parity-audit
4 checks passed
salahmyn
deleted the
feature/SAL-3523-add-pre-commit-hook-formats-lints-staged-files
branch
October 27, 2026 10:43
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
pnpm installnow setscore.hooksPathto.githooks(thepreparescript skips quietly outside a git checkout). The pre-commit hook runs Prettier (write) and ESLint (--fix) on staged ts/tsx/js/json/scss/css/md files only, re-stages them, and refuses the commit on remaining lint errors. It does not run tests. No new dependencies: a small shell script, no lint-staged.Verification
pnpm lint(0 errors),format:check,typecheck(after build),build,check:manifestpass.pnpm test: 4 wishlist-heart tests inProductDetails.test.tsxfail locally (localStorage.clearundefined, local Node 26 vs the pinned 22); unrelated to this change.

Confidence Score: 5/5
The PR appears safe to merge; the Windows installation issue is fixed and no new blocking issue was found.Summary
Adds a pre-commit hook that formats and lints staged files, then stages the results.
Reviews (4) · Last reviewed commit: "fix(devops): install the git hook from a..." · Reviewed by Greptile