chore: setup husky and commitlint similar to systemfsoftware - #3
Merged
Conversation
Configure husky commit-msg, pre-commit and prepare-commit-msg hooks with vendored repos/ skip, commitlint with no-ai-coauthors and type-matches-diff-shape rules via pure Deno (deno run npm:*), no pnpm/package.json mixing
Mirrors systemfsoftware pre-push (check-remote-main) — refuses push when HEAD does not contain origin/main
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
Commits are now validated on the client and vendored history is ignored.
commit-msgruns commitlint (no AI co-authors, shape-aware type checks) viadeno run npm:@commitlint/cli;pre-commitformats and lints staged non-vendored files before they enter the index.Details
commit-msg,pre-commit,prepare-commit-msg) skiprepos/andsubtrees.toml(annotated grep^(repos/.*|subtrees\.toml)$), skip merge duringMERGE_HEAD, strip AICo-authored-bytrailerscommitlint.config.ts) mirrorssystemfsoftwarerules:type-enum,no-ai-coauthors,type-matches-diff-shape(docs/test/CI/lockfile/tooling),scope-enum(repo/deps/release/ci/scripts/hooks), footer ignores forSquashed 'andgit-subtree-dir:package.json/pnpm-lock.yaml; tasks usedeno run npm:*withnodeModulesDir: autoanddeno installpopulatesnode_modules/.denoVerification
deno task check—dprint check+deno lint+deno check scripts/*.tspassesecho "chore: test" | deno run --allow-read --allow-run --allow-env --allow-sys npm:@commitlint/cli— passes;echo "bad" | ...— failstype-empty/subject-emptyas expected