Skip to content

Commit ce942da

Browse files
authored
Merge pull request #405 from chimurai/lintstaged
ci(pre-commit): lint-staged linting
2 parents 245f7da + 2ea005d commit ce942da

File tree

3 files changed

+343
-49
lines changed

3 files changed

+343
-49
lines changed

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"**/*.{js,ts,md}": "prettier --write",
3+
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@
6262
"connect": "^3.6.6",
6363
"coveralls": "^3.0.5",
6464
"express": "^4.16.4",
65-
"husky": "^3.0.0",
65+
"husky": "^4.2.3",
6666
"jest": "^25.1.0",
67+
"lint-staged": "^10.0.7",
6768
"open": "^7.0.2",
6869
"prettier": "^1.19.1",
6970
"ts-jest": "^25.2.0",
@@ -84,7 +85,8 @@
8485
},
8586
"husky": {
8687
"hooks": {
87-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
88+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
89+
"pre-commit": "lint-staged"
8890
}
8991
},
9092
"commitlint": {

0 commit comments

Comments
 (0)