diff --git a/tools/run-eslint.sh b/tools/run-eslint.sh index 45bd267d..6d2c72c4 100755 --- a/tools/run-eslint.sh +++ b/tools/run-eslint.sh @@ -3,6 +3,10 @@ # SPDX-FileCopyrightText: 2020 Philip Chimento # SPDX-FileCopyrightText: 2025 Florian Müllner -cd $(dirname -- "$0") +srcdir=$(dirname -- "$0") + +cd $srcdir [ ! -d node_modules ] && npm clean-install +# Link in project root to make imports work properly +[ ! -e ../node_modules ] && ln -s $srcdir/node_modules ../node_modules npm run lint -- "$@"