Skip to content

Commit 3df18c7

Browse files
authored
Merge pull request #138 from moneytree/formatting
build(all): setup prettier formatting in pre-commit hook
2 parents 3e69566 + fc70d52 commit 3df18c7

File tree

4 files changed

+153
-182
lines changed

4 files changed

+153
-182
lines changed

.huskyrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hooks": {
3-
"pre-commit": "yarn lint && yarn test",
3+
"pre-commit": "yarn format && yarn lint && yarn test",
44
"commitmsg": "commitlint -e $GIT_PARAMS"
55
}
66
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"lint:js": "eslint '**/*.js'",
1919
"lint:ts": "eslint -c './.eslintrc-ts.js' '**/*.ts'",
2020
"lint": "yarn lint:js; yarn lint:ts",
21+
"format": "prettier scripts src sample/src --write",
2122
"lint:fix": "yarn lint:js --fix; yarn lint:ts --fix",
2223
"start:docs": "docsify serve docs",
2324
"prepare": "husky install"

0 commit comments

Comments
 (0)