Skip to content

Commit

Permalink
chore: add lint-staged hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
yarastqt committed Sep 9, 2019
1 parent bd81a52 commit 574dc64
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
14 changes: 14 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"*.{js,ts,tsx}": [
"prettier --write",
"git add"
],
"*.md": [
"prettier --write --parser markdown",
"git add"
],
"*.json": [
"prettier --write --parser json",
"git add"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"husky": "3.0.5",
"jsdom": "13.0.0",
"lerna": "3.5.1",
"lint-staged": "^9.2.5",
"mocha": "5.2.0",
"nyc": "13.1.0",
"prettier": "^1.18.2",
Expand Down

0 comments on commit 574dc64

Please sign in to comment.