Code style improvments, to pass SonarCloud review

This commit is contained in:
Alicia Sykes
2021-12-27 00:39:30 +00:00
parent fac3e8e456
commit 15eddb1565
13 changed files with 25 additions and 55 deletions

View File

@@ -141,8 +141,8 @@ export default {
return 'fg-grey';
},
makeScoreColor(inputScore) {
if (!inputScore || Number.isNaN(parseFloat(inputScore, 10))) return 'bg-grey';
const score = parseFloat(inputScore, 10);
if (!inputScore || Number.isNaN(parseFloat(inputScore))) return 'bg-grey';
const score = parseFloat(inputScore);
if (score >= 9) return 'bg-red';
if (score >= 7) return 'bg-orange';
if (score >= 4) return 'bg-yellow';