2022-05-11 18:47:31 -04:00
|
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
. "$DIR/.common.sh"
|
|
|
|
|
|
|
|
|
|
# Ensure docker-compose exists
|
|
|
|
|
if hash docker 2>/dev/null; then
|
|
|
|
|
cd "${DIR}/.."
|
|
|
|
|
echo -e "${BLUE}❯ ${CYAN}Linting Frontend ...${RESET}"
|
2024-05-07 19:41:32 -04:00
|
|
|
|
docker run --rm -e CI=true -v "$(pwd)/frontend:/app/frontend" -w /app/frontend node:20 sh -c "yarn install && yarn eslint src;chown -R $(id -u):$(id -g) /app/frontend"
|
2022-05-11 18:47:31 -04:00
|
|
|
|
RES=$?
|
|
|
|
|
echo -e "${BLUE}❯ ${GREEN}Linting Frontend Complete${RESET}"
|
|
|
|
|
exit $RES
|
|
|
|
|
else
|
|
|
|
|
echo -e "${RED}❯ docker command is not available${RESET}"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|