diff options
-rwxr-xr-x | format-code.sh | 7 | ||||
-rwxr-xr-x | run-ci | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/format-code.sh b/format-code.sh index 9649a403..b93ca626 100755 --- a/format-code.sh +++ b/format-code.sh @@ -14,6 +14,11 @@ if [ -n "$1" ]; then cd "$1" fi -npm ci +npm install npm run lint + +# CI might be running a different version of NPM than yocto, and we don't +# want to trigger a formatting failure if package-lock.json has changed +# Therefore, revert it back to what it was previously. +git checkout package-lock.json git --no-pager diff --exit-code @@ -10,6 +10,5 @@ if [ -n "$1" ]; then cd "$1" fi -# It is expected that the format-code script was already run as part of the CI -# so the node modules needed to run this script will be installed +npm ci npm run test:unit |