diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-09 10:31:28 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-09 10:31:28 +0000 |
commit | 35b4ca37d6660f3ce6f2e8d1af77fcf271995bd1 (patch) | |
tree | 0a0777533f1ba28138001b8e6caad156db216d6d | |
parent | 5e471c78ec091835b1341e0f09abb4e089d225ed (diff) | |
parent | d42cd343ca66aaebb8877c935d1754efcbaea09b (diff) | |
download | gitlab-ce-35b4ca37d6660f3ce6f2e8d1af77fcf271995bd1.tar.gz |
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
-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)`); |