title: How to add git prehook to tslint?
body: <p>i am trying to add prehook if there is any linting issue with the code fail to commit.what is correct approach to implement it.</p>
  
  <p>tslint.sh</p>
  
  <pre><code>#!/bin/sh
  sh ./npm-install.sh
  if [ $? -ne 0 ]; then
    echo "npm-install error, exiting.."
    exit 1
  fi
  echo "Running ts lint"
  npm run lint
  if [ $? -ne 0 ]; then
    echo "Unit tests error, exiting.."
    exit 1
  fi
  </code></pre>