Skip to content

Commit cdf5b73

Browse files
committed
chore: add husky hook for commitlint
1 parent 4180bbe commit cdf5b73

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.husky/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "npm run clean && webpack --colors --bail",
88
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist",
99
"deploy": "touch build/.nojekyll && gh-pages -t -d build -m \"[skip ci] Build for $(git log --pretty=format:%H -n1)\"",
10+
"prepare": "husky install",
1011
"prune": "./prune-gh-pages.sh",
1112
"i18n:push": "tx-push-src scratch-editor interface translations/en.json",
1213
"i18n:src": "rimraf ./translations/messages/src && babel src > tmp.js && rimraf tmp.js && build-i18n-src ./translations/messages/src ./translations/ && npm run i18n:push",
@@ -117,6 +118,7 @@
117118
"eslint-plugin-react": "7.24.0",
118119
"gh-pages": "3.2.3",
119120
"html-webpack-plugin": "3.2.0",
121+
"husky": "8.0.1",
120122
"jest": "21.2.1",
121123
"jest-junit": "7.0.0",
122124
"mkdirp": "1.0.3",

0 commit comments

Comments
 (0)