Skip to content

Instantly share code, notes, and snippets.

Last active May 8, 2018
What would you like to do?
Pre-commit stuff
// 1
scripts: {
// ...
"precommit": "lint-staged",
"lint-staged-stash": "git stash save --keep-index 'lint-staged' && touch .didstash || rm .didstash || true",
"lint-staged-stash-pop": "test -f .didstash && rm .didstash && git stash pop || true"
"lint-staged": {
"*.js": ["lint-staged-stash", "eslint --fix", "git add", "lint-staged-stash-pop"]
// 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment