unwind/scripts/lint-js
2021-07-28 23:08:10 +02:00

21 lines
301 B
Bash
Executable file

#!/bin/sh -eu
cd "$RUN_DIR"
if [ "${1:-}" = '--fix' ]; then
mode=fix
else
mode=check
fi
if [ "$mode" = 'fix' ]; then
prettier_opts=--write
else
prettier_opts=--check
fi
[ -z "${DEBUG:-}" ] || set -x
cd unwind-ui
npm run lint ||:
npx prettier $prettier_opts 'src/**/*.{js,ts,vue}'