mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
25 lines
590 B
Bash
Executable file
25 lines
590 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source ./scripts/common.sh
|
|
|
|
jsfiles=$(cachedTSLintFiles)
|
|
otherfiles=$(cachedPrettierFiles)
|
|
|
|
# Check if any of the files are ugly or contain a console.log call
|
|
consoleFiles=$(noisy $jsfiles)
|
|
uglyFiles="$(tslintUgly $jsfiles)"
|
|
if [ ! -n "$uglyFiles" ]; then
|
|
uglyFiles="$(prettierUgly $otherfiles)"
|
|
fi
|
|
|
|
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 'yarn run pretty'
|
|
exit 1
|
|
fi
|