Skip to content

Commit

Permalink
chore(precise-commits): configure precise-commits
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Feb 2, 2022
1 parent e59e45a commit 9f093f6
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Workaround for Windows 10, Git Bash and Yarn, https://typicode.github.io/husky/#/?id=yarn-on-windows
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn pre-commit
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"repository": "github:softwareventures/array",
"license": "ISC",
"scripts": {
"pre-commit": "precise-commits",
"fix": "tsc --noEmit && eslint . --fix && prettier --write .",
"lint": "tsc --noEmit && eslint . && prettier --check .",
"prepare": "tsc",
"prepare": "husky install && tsc",
"semantic-release": "semantic-release",
"test": "ava"
},
Expand All @@ -31,12 +32,14 @@
},
"devDependencies": {
"@softwareventures/eslint-config": "5.1.0",
"@softwareventures/precise-commits": "2.0.17",
"@softwareventures/prettier-config": "3.0.0",
"@softwareventures/semantic-release-config": "2.0.0",
"@softwareventures/tsconfig": "5.1.1",
"ava": "4.0.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.8.0",
"husky": "7.0.4",
"prettier": "2.5.1",
"semantic-release": "17.4.7",
"ts-node": "10.4.0",
Expand Down
Loading

0 comments on commit 9f093f6

Please sign in to comment.