Lint commit message according to Conventional Commits.
Pipe the commit message to @rnx-kit/commitlint-lite
:
echo 'ci: lint commit messages' | npx @rnx-kit/commitlint-lite
Example: In a PR, only the first commit's message needs to conform if you always squash before merging:
git log --format='%s' origin/trunk..HEAD | tail -1 | npx @rnx-kit/commitlint-lite