Commit 5132c997 authored by Lukas Eipert's avatar Lukas Eipert

Adjust a few instances of `no-else-return`

We currently have `no-else-return` with `allowElseIf: true`. This fixes
a few instances to comply with `allowElseIf: false`.
parent 1bf82271
...@@ -63,9 +63,11 @@ export default { ...@@ -63,9 +63,11 @@ export default {
{ pipelineLink, projectLink }, { pipelineLink, projectLink },
false, false,
); );
} else if (pipelineLink && !projectLink) { }
if (pipelineLink && !projectLink) {
return sprintf(__('Dismissed on pipeline %{pipelineLink}'), { pipelineLink }, false); return sprintf(__('Dismissed on pipeline %{pipelineLink}'), { pipelineLink }, false);
} else if (!pipelineLink && projectLink) { }
if (!pipelineLink && projectLink) {
return sprintf(__('Dismissed at %{projectLink}'), { projectLink }, false); return sprintf(__('Dismissed at %{projectLink}'), { projectLink }, false);
} }
return __('Dismissed'); return __('Dismissed');
......
...@@ -5,7 +5,8 @@ export default { ...@@ -5,7 +5,8 @@ export default {
checkReportStatus(loading, error) { checkReportStatus(loading, error) {
if (loading) { if (loading) {
return LOADING; return LOADING;
} else if (error) { }
if (error) {
return ERROR; return ERROR;
} }
......
...@@ -24,13 +24,15 @@ export const enrichVulnerabilityWithFeedback = (vulnerability, feedback = []) => ...@@ -24,13 +24,15 @@ export const enrichVulnerabilityWithFeedback = (vulnerability, feedback = []) =>
isDismissed: true, isDismissed: true,
dismissalFeedback: fb, dismissalFeedback: fb,
}; };
} else if (fb.feedback_type === 'issue' && fb.issue_iid) { }
if (fb.feedback_type === 'issue' && fb.issue_iid) {
return { return {
...vuln, ...vuln,
hasIssue: true, hasIssue: true,
issue_feedback: fb, issue_feedback: fb,
}; };
} else if (fb.feedback_type === 'merge_request' && fb.merge_request_iid) { }
if (fb.feedback_type === 'merge_request' && fb.merge_request_iid) {
return { return {
...vuln, ...vuln,
hasMergeRequest: true, hasMergeRequest: true,
......
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