Skip to content

Commit

Permalink
chore(build): update pre-commit hook to use lint-staged (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
austingreendev committed Jan 9, 2019
1 parent b5736d9 commit 42af310
Show file tree
Hide file tree
Showing 4 changed files with 268 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"
}
}
17 changes: 17 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"*.js": [
"stylelint",
"eslint",
"prettier --write",
"git add"
],
"*.md": [
"markdownlint",
"prettier --write",
"git add"
],
"**/package.json": [
"prettier-package-json --write",
"git add"
]
}
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"jest-enzyme": "7.0.1",
"jest-styled-components": "6.3.1",
"lerna": "3.8.0",
"lint-staged": "8.1.0",
"live-server": "1.2.1",
"markdown-loader": "4.0.0",
"markdownlint-cli": "0.13.0",
Expand All @@ -98,10 +99,5 @@
"webpack-cli": "3.1.2",
"webpack-merge": "4.1.5",
"webpack-node-externals": "1.7.2"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn format"
}
}
}

0 comments on commit 42af310

Please sign in to comment.