Skip to content

Instantly share code, notes, and snippets.

@Artawower
Created March 25, 2022 07:34
Show Gist options
  • Save Artawower/702271a627fa416867feffa553ffce9f to your computer and use it in GitHub Desktop.
Save Artawower/702271a627fa416867feffa553ffce9f to your computer and use it in GitHub Desktop.
#! /bin/sh
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
FILES_LIST=$(git diff --name-only ${CURRENT_BRANCH} $(git merge-base ${CURRENT_BRANCH} master) | awk '/\.ts$/ {print "--lint-file-patterns="$0}')
npm run lint -- <project_name> $FILES_LIST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment