summaryrefslogtreecommitdiffstatshomepage
path: root/core/scripts/dev/commit-code-check.sh
diff options
context:
space:
mode:
authorLauri Eskola <lauri.eskola@acquia.com>2022-09-15 20:35:27 +0300
committerLauri Eskola <lauri.eskola@acquia.com>2022-09-15 20:35:27 +0300
commitb5d5cddc621a97144d0a6b0779e6a00a30494907 (patch)
treee35f1abc15243b5dd4309135e801ee778d5aa20a /core/scripts/dev/commit-code-check.sh
parent7db1fcdb41213e966624080ec1fa297d04e4a9bf (diff)
downloaddrupal-b5d5cddc621a97144d0a6b0779e6a00a30494907.tar.gz
drupal-b5d5cddc621a97144d0a6b0779e6a00a30494907.zip
Issue #3309807 by nod_: Fix commit eslint checks following removal of es6 files
Diffstat (limited to 'core/scripts/dev/commit-code-check.sh')
-rwxr-xr-xcore/scripts/dev/commit-code-check.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh
index d91ed13dce60..9b50666f6d55 100755
--- a/core/scripts/dev/commit-code-check.sh
+++ b/core/scripts/dev/commit-code-check.sh
@@ -384,14 +384,15 @@ for FILE in $FILES; do
### JAVASCRIPT FILES
############################################################################
if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]]; then
+ cd "$TOP_LEVEL/core"
# Check the coding standards.
- if [[ -f ".eslintrc.passing.json" ]]; then
- node ./node_modules/eslint/bin/eslint.js --quiet --config=.eslintrc.passing.json "$TOP_LEVEL/$FILE"
- CORRECTJS=$?
- if [ "$CORRECTJS" -ne "0" ]; then
- # No need to write any output the node command will do this for us.
- STATUS=1
- fi
+ node ./node_modules/eslint/bin/eslint.js --quiet --config=.eslintrc.passing.json "$TOP_LEVEL/$FILE"
+ JSLINT=$?
+ if [ "$JSLINT" -ne "0" ]; then
+ # No need to write any output the node command will do this for us.
+ STATUS=1
+ else
+ printf "ESLint: $FILE ${green}passed${reset}\n"
fi
cd $TOP_LEVEL
fi