Skip to content

Instantly share code, notes, and snippets.

@richrout
Created August 11, 2017 14:01
Show Gist options
  • Save richrout/1b39057c2d8989419a881c0f724b8703 to your computer and use it in GitHub Desktop.
Save richrout/1b39057c2d8989419a881c0f724b8703 to your computer and use it in GitHub Desktop.
Git pre-commit hook to run tslint on modified files only
#!/bin/sh
git diff --cached --name-only | egrep ".*\.tsx?" | xargs -r tslint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment