Skip to content

Instantly share code, notes, and snippets.

@felippenardi
Last active February 14, 2022 12:02
Show Gist options
  • Save felippenardi/7810b0824f47bf838eb2c8a75a09e560 to your computer and use it in GitHub Desktop.
Save felippenardi/7810b0824f47bf838eb2c8a75a09e560 to your computer and use it in GitHub Desktop.

Revisions

  1. felippenardi revised this gist Oct 11, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions run_eslint.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ CHANGED_FILES=`git diff origin/master...HEAD --name-only`

    node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet
    if [[ $? != 0 ]] ; then
    ./gitstatus.sh Eslint failure "Fix style violations"
    echo "Fix style violations"
    exit 1
    fi
    ./gitstatus.sh Eslint success "All changed files are good"
    echo "All changed files are good"
  2. felippenardi created this gist Oct 11, 2018.
    10 changes: 10 additions & 0 deletions run_eslint.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/bash

    CHANGED_FILES=`git diff origin/master...HEAD --name-only`

    node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet
    if [[ $? != 0 ]] ; then
    ./gitstatus.sh Eslint failure "Fix style violations"
    exit 1
    fi
    ./gitstatus.sh Eslint success "All changed files are good"