Skip to content

Commit 1f06e03

Browse files
committedDec 9, 2021
fix: correct .husky postinstall script
1 parent bd7f7bd commit 1f06e03

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎__tests__/install.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ describe('test installing the package', () => {
110110

111111
test('.husky files content sane', async () => {
112112
const contents = await fs.readFile('.husky/commit-msg', { encoding: 'utf8' });
113-
expect(contents).toContain('npx --no-install commitlint --edit $1');
113+
expect(contents).toContain('npx --no-install commitlint -e $1');
114114
});
115115
});
116116

‎package.json

+7
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,12 @@
7979
],
8080
"jest": {
8181
"testURL": "http://tester.local"
82+
},
83+
"husky": {
84+
"hooks": {
85+
"pre-commit": "lint-staged",
86+
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
87+
"prepare-commit-msg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $HUSKY_GIT_PARAMS"
88+
}
8289
}
8390
}

0 commit comments

Comments
 (0)
Please sign in to comment.