Skip to content

Commit

Permalink
chore: add githook to lint commit message before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pleb committed Jun 20, 2022
1 parent 037055a commit bddc9a6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
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"

npm run commitlint
22 changes: 22 additions & 0 deletions package-lock.json

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

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"lint": "eslint ./src/ --ext .ts",
"lint:fix": "eslint ./src/ --ext .ts --fix",
"commitlint": "commitlint --edit -o",
"generate-doc": "typedoc src/"
"generate-doc": "typedoc src/",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand All @@ -38,17 +39,18 @@
},
"peeprDependencies": {},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@types/jest": "^28.1.1",
"@types/node": "^17.0.42",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"conventional-changelog-conventionalcommits": "^5.0.0",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^8.0.1",
"jest": "^28.1.1",
"prettier": "^2.7.0",
"semantic-release": "^19.0.3",
Expand Down

0 comments on commit bddc9a6

Please sign in to comment.