Commit 35b4ca37 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch...

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
parents 5e471c78 d42cd343
...@@ -49,7 +49,7 @@ const stagedFiles = ...@@ -49,7 +49,7 @@ const stagedFiles =
if (stagedFiles) { if (stagedFiles) {
if (!stagedFiles.length || (stagedFiles.length === 1 && !stagedFiles[0])) { if (!stagedFiles.length || (stagedFiles.length === 1 && !stagedFiles[0])) {
console.log('No matching staged files.'); console.log('No matching staged files.');
return; process.exit(1);
} }
console.log(`Matching staged Files : ${stagedFiles.length}`); console.log(`Matching staged Files : ${stagedFiles.length}`);
} }
...@@ -78,7 +78,7 @@ files = prettierIgnore.filter(files); ...@@ -78,7 +78,7 @@ files = prettierIgnore.filter(files);
if (!files.length) { if (!files.length) {
console.log('No Files found to process with Prettier'); console.log('No Files found to process with Prettier');
return; process.exit(1);
} }
console.log(`${shouldSave ? 'Updating' : 'Checking'} ${files.length} file(s)`); console.log(`${shouldSave ? 'Updating' : 'Checking'} ${files.length} file(s)`);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment