Skip to content

Commit

Permalink
build: husky script for commit linting
Browse files Browse the repository at this point in the history
This will make sure the commit linted according to conventional commits
which have been adopted after discussion. See `docs/coding-standards.md`.

haha: WIP
  • Loading branch information
marceljay committed Aug 16, 2023
1 parent db6b127 commit a0cf6f2
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 134 deletions.
6 changes: 6 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if grep -q 'WIP' "$1"; then
echo "Commit with 'WIP' detected - skipping commitlint."
exit 0
fi

yarn commitlint --edit "$1"
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Docs
docs/
README.md
##

# Contracts
packages/contracts/
Expand All @@ -25,6 +26,7 @@ packages/lib-base/
packages/lib-react/

# Explicitly ignore config files without prettier parser (needed for lint-staged)
commitlint.config.js
.editorconfig
.gitblameignore
.gitmodules
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
]
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^16.2.1",
"@microsoft/api-documenter": "^7.17.14",
"fs-extra": "^9.1.0",
Expand Down
Loading

0 comments on commit a0cf6f2

Please sign in to comment.