mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
23 lines
500 B
Bash
Executable file
23 lines
500 B
Bash
Executable file
#!/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
|
|
}
|