mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
24 lines
500 B
Text
24 lines
500 B
Text
![]() |
#!/bin/bash
|
||
|
|
||
|
cachedJS() {
|
||
|
git diff --cached --name-only --diff-filter=ACM "*.js" "*.jsx" "*.ts" "*.tsx" | tr '\n' ' '
|
||
|
}
|
||
|
|
||
|
ugly() {
|
||
|
local acc=()
|
||
|
for jsfile in "$@"; do
|
||
|
diff "$jsfile" <($(npm bin)/prettier "$jsfile") >/dev/null || acc+=("$jsfile")
|
||
|
done
|
||
|
echo $acc
|
||
|
}
|
||
|
|
||
|
noisy() {
|
||
|
local acc=()
|
||
|
for jsfile in "$@"; do
|
||
|
if [ "$(git diff --cached "$jsfile" | grep '^+.*console.log' -c)" -gt '0' ] ; then
|
||
|
acc+=("jsfile")
|
||
|
fi
|
||
|
done
|
||
|
echo $acc
|
||
|
}
|