diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-09 13:31:28 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-07-09 15:18:14 +0300 |
commit | 7c7ca8bc465a3aca842564aff94ff43d3489c81a (patch) | |
tree | 69b6eff58d8e8788994e458377df7b4bff19f428 /scripts | |
parent | 652cd1ba016b45e88379f87fe795e1ea7bb355ac (diff) |
Merge branch '49007-sast-fails-with-syntaxerror-in-scripts-frontend-prettier-js-return-outside-of-function-52-4' into 'master'
Remove return statements from prettier script
Closes #49007
See merge request gitlab-org/gitlab-ce!20488
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/frontend/prettier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/frontend/prettier.js b/scripts/frontend/prettier.js index 6e4e36b9b2d..b66ba885701 100644 --- a/scripts/frontend/prettier.js +++ b/scripts/frontend/prettier.js @@ -49,7 +49,7 @@ const stagedFiles = if (stagedFiles) { if (!stagedFiles.length || (stagedFiles.length === 1 && !stagedFiles[0])) { console.log('No matching staged files.'); - return; + process.exit(1); } console.log(`Matching staged Files : ${stagedFiles.length}`); } @@ -78,7 +78,7 @@ files = prettierIgnore.filter(files); if (!files.length) { console.log('No Files found to process with Prettier'); - return; + process.exit(1); } console.log(`${shouldSave ? 'Updating' : 'Checking'} ${files.length} file(s)`); |