Skip to content

Instantly share code, notes, and snippets.

@jukben
Last active February 25, 2019 12:35
Show Gist options
  • Save jukben/1252a8f6f8315b4166da4a68bdecd5fc to your computer and use it in GitHub Desktop.
Save jukben/1252a8f6f8315b4166da4a68bdecd5fc to your computer and use it in GitHub Desktop.
Pre commit Husky + Lint-staged with option to opt out
#!/bin/bash
# http://mywiki.wooledge.org/BashFAQ/105
set -e
if [[ $(git config --get husky.hooks) == "false" ]]; then exit 0; fi
yarn run lint-staged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment