Skip to content

Instantly share code, notes, and snippets.

@sotayamashita
Last active December 4, 2018 07:07
Show Gist options
  • Save sotayamashita/64dcb159dd2eb05758d9a45742bbbd30 to your computer and use it in GitHub Desktop.
Save sotayamashita/64dcb159dd2eb05758d9a45742bbbd30 to your computer and use it in GitHub Desktop.
TIL: Check ruby syntax against staged git files and don't let πŸ’© slip into your code base with husky and lint-staged
{
"devDependencies": {
"husky": "^1.2.0",
"lint-staged": "^8.1.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.rb": ["ruby -c", "git add"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment