summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-07-09 10:31:28 +0000
committerAlessio Caiazza <acaiazza@gitlab.com>2018-07-09 14:18:14 +0200
commit7c7ca8bc465a3aca842564aff94ff43d3489c81a (patch)
tree69b6eff58d8e8788994e458377df7b4bff19f428
parent652cd1ba016b45e88379f87fe795e1ea7bb355ac (diff)
downloadgitlab-ce-7c7ca8bc465a3aca842564aff94ff43d3489c81a.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.js4
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)`);