Skip to content

Commit c28f12b

Browse files
committed
chore: add husky hook for commitlint
1 parent 6e0a331 commit c28f12b

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
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: 22 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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
"main": "dist.js",
66
"browser": "./src/index.js",
77
"scripts": {
8-
"test": "npm run lint && npm run tap && npm run build",
98
"build": "webpack --bail",
10-
"watch": "webpack --watch",
119
"lint": "eslint .",
12-
"tap": "tap test/effects/*.js test/*.js"
10+
"prepare": "husky install",
11+
"tap": "tap test/effects/*.js test/*.js",
12+
"test": "npm run lint && npm run tap && npm run build",
13+
"watch": "webpack --watch"
1314
},
1415
"repository": {
1516
"type": "git",
@@ -35,6 +36,7 @@
3536
"babel-preset-env": "1.7.0",
3637
"eslint": "8.0.1",
3738
"eslint-config-scratch": "9.0.3",
39+
"husky": "8.0.3",
3840
"json": "9.0.6",
3941
"tap": "12.7.0",
4042
"web-audio-test-api": "0.5.2",

0 commit comments

Comments
 (0)