fabric-samples/ci/scripts/lint-javascript.sh
Josh Kneubuhl 8b0dab01b0 Move linters from Azure to GHA
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2022-11-13 05:28:02 -05:00

22 lines
No EOL
346 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
function print() {
GREEN='\033[0;32m'
NC='\033[0m'
echo
echo -e "${GREEN}${1}${NC}"
}
dirs=("$(find . -name "*-javascript" -type d -not -path '*/.*')")
for dir in $dirs; do
print "Linting $dir"
pushd $dir
print "Installing node modules"
npm install
print "Running Lint"
npm run lint
popd
done