mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 15:26:18 -04:00
24 lines
489 B
Bash
Executable file
24 lines
489 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source ./scripts/common
|
|
|
|
jsfiles=$(cachedFiles)
|
|
|
|
[ -z "$jsfiles" ] && exit 0
|
|
|
|
# Check if any of the files are ugly or contain a console.log call
|
|
consoleFiles=$(noisy $jsfiles)
|
|
uglyFiles=$(ugly $jsfiles)
|
|
|
|
if [ -n "$consoleFiles" ]; then
|
|
echo "Warning: adding console.log calls in ${consoleFiles[@]}"
|
|
echo 'Did you mean to use logger.debug?'
|
|
echo
|
|
fi
|
|
|
|
if [ -n "$uglyFiles" ]; then
|
|
echo "Prettify your files first:"
|
|
echo 'npm run pretty'
|
|
exit 1
|
|
fi
|