Skip to content

Commit

Permalink
better passing off of cmd-line args
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Feb 23, 2024
1 parent e3518ee commit 66a6b94
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lint
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ for i in package.json .eslintrc.cjs .eslint.await.finder.cjs .eslint.await.finde
done
trap "{ rm -f $REMOVES; }" EXIT

ARGS=.
if [ $# -gt 0 ]; then ARGS="$@"; fi
if [ $# -eq 0 ]; then 1=.; fi

set -x

deno lint -c deno.json "$ARGS"
npx eslint "$ARGS"
deno lint -c deno.json "$@"

npx eslint "$@"

# Promises - look for missing `await` in callers of `async` functions
# Promises - look for missing parens, eg: `await exe('ls').trim()` => `(await exe('ls')).trim()`
# ^^ cheap approximate: git grep -P 'await[^)]+\)\.'
npx eslint -c .eslint.await.finder.cjs "$ARGS" \
npx eslint -c .eslint.await.finder.cjs "$@" \
|egrep "\.js|floating-promises" \
|egrep -B1 floating-promises \
|tee .proms

npx tslint --type-check -p tsconfig.json "$ARGS" 2>&1 \
npx tslint --type-check -p tsconfig.json "$@" 2>&1 \
|fgrep -v www/jw/8/jwplayer.js \
|fgrep Promise \
|fgrep roperty \
Expand Down

0 comments on commit 66a6b94

Please sign in to comment.