Skip to content

Commit a8980ad

Browse files
committed
chore(precise-commits): configure precise-commits
1 parent 67302aa commit a8980ad

File tree

4 files changed

+181
-12
lines changed

4 files changed

+181
-12
lines changed

.husky/common.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
command_exists () {
2+
command -v "$1" >/dev/null 2>&1
3+
}
4+
5+
# Workaround for Windows 10, Git Bash and Yarn, https://typicode.github.io/husky/#/?id=yarn-on-windows
6+
if command_exists winpty && test -t 1; then
7+
exec < /dev/tty
8+
fi

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
4+
5+
yarn pre-commit

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
"repository": "github:softwareventures/i32",
1616
"license": "ISC",
1717
"scripts": {
18+
"pre-commit": "precise-commits",
1819
"fix": "tsc --noEmit && eslint . --fix && prettier --write .",
1920
"lint": "tsc --noEmit && eslint . && prettier --check .",
20-
"prepare": "tsc",
21+
"prepare": "husky install && tsc",
2122
"semantic-release": "semantic-release",
2223
"test": "ava"
2324
},
@@ -33,12 +34,14 @@
3334
},
3435
"devDependencies": {
3536
"@softwareventures/eslint-config": "5.1.0",
37+
"@softwareventures/precise-commits": "2.0.18",
3638
"@softwareventures/prettier-config": "3.0.0",
3739
"@softwareventures/semantic-release-config": "2.0.0",
3840
"@softwareventures/tsconfig": "5.1.1",
3941
"ava": "4.0.1",
4042
"cz-conventional-changelog": "3.3.0",
4143
"eslint": "8.8.0",
44+
"husky": "7.0.4",
4245
"prettier": "2.5.1",
4346
"semantic-release": "17.4.7",
4447
"ts-node": "10.4.0",

0 commit comments

Comments
 (0)