Skip to content

Commit

Permalink
chore: add husky hook for commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Oct 13, 2022
1 parent 5c4b474 commit 1766fe4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .husky/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Shareable ESLint config for Scratch",
"main": "index.js",
"scripts": {
"prepare": "husky install",
"test": "eslint ."
},
"eslintConfig": {
Expand Down Expand Up @@ -35,7 +36,8 @@
"@babel/eslint-parser": "7.17.0",
"@commitlint/cli": "17.1.2",
"@commitlint/config-conventional": "17.1.0",
"eslint": "8.15.0"
"eslint": "8.15.0",
"husky": "8.0.1"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit 1766fe4

Please sign in to comment.