diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 3d00ad3..6e431bf 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -1,5 +1,12 @@ #!/bin/bash -sasjs lint + +# Ensure lint is passing +LINT=`sasjs lint` +if [[ "$LINT" != "✔ All matched files use @sasjs/lint code style!" ]]; then + echo "$LINT" + echo "To commit in spite of these warnings, use the -n parameter." + exit 1 +fi # Avoid commits to the master branch BRANCH=`git rev-parse --abbrev-ref HEAD` diff --git a/.gitpod.yml b/.gitpod.yml index 47c1990..b825a64 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,7 +1,7 @@ tasks: - - init: | - nvm install --lts - npm i -g @sasjs/cli + - init: npm install -g npm + - command: npm i + - command: npm i -g @sasjs/cli image: file: .gitpod.dockerfile @@ -24,4 +24,4 @@ github: # add a "Review in Gitpod" button to pull requests (defaults to false) addBadge: false # add a label once the prebuild is ready to pull requests (defaults to false) - addLabel: prebuilt-in-gitpod \ No newline at end of file + addLabel: prebuilt-in-gitpod