Skip to content

Commit

Permalink
Merge pull request #126 from reactjs/test/install-commit-hook
Browse files Browse the repository at this point in the history
Automatically execute Lint before commit with lint-staged and husky
  • Loading branch information
smikitky authored Feb 16, 2019
2 parents b2fa746 + 17a98cc commit c689c9f
Show file tree
Hide file tree
Showing 2 changed files with 436 additions and 9 deletions.
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,24 @@
"devDependencies": {
"@babel/preset-flow": "^7.0.0",
"eslint-config-prettier": "^2.6.0",
"husky": "^1.3.1",
"lint-staged": "^8.1.4",
"lz-string": "^1.4.4",
"npm-run-all": "^4.1.5",
"recursive-readdir": "^2.2.1",
"textlint": "^11.2.1",
"textlint-rule-preset-jtf-style": "^2.3.3",
"unist-util-map": "^1.0.3"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.md": [
"textlint --rulesdir=./textlint",
"git add"
]
}
}
Loading

0 comments on commit c689c9f

Please sign in to comment.