Skip to content

Commit

Permalink
Simplify linting GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
mtriff committed Dec 19, 2021
1 parent 9835eb7 commit c26596e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@ jobs:
node-version: 12

- name: Install dependencies
run: npm install --no-optional --no-audit --ignore-scripts
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
HUSKY_SKIP_INSTALL: true

- name: run eslint
run: |
CHANGED_TS=$(git --no-pager diff --name-only ..origin/master | grep '^src\/scripts\/.*\.ts$' | xargs ls -d 2>/dev/null | paste -sd " " -)
if [[ -z $(sed -e 's/[[:space:]]*$//' <<<${CHANGED_TS}) ]]; then CHANGED_TS="src/scripts"; fi
echo $CHANGED_TS
node node_modules/eslint/bin/eslint.js $CHANGED_TS
run: npm run lint:js

## Can't use same eslint config for TypeScript and JavaScript
## TypeScript rules cause rule definition not found errors
Expand Down

0 comments on commit c26596e

Please sign in to comment.