From a4bf87a30be2a5a30916fa31a8aec4a9c0cf1269 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Thu, 8 Feb 2024 22:31:25 +0100 Subject: [PATCH] (ci) replace --quiet with a grep excluding warings for lint --quiet also disables fixing of warnings, making it not possible to check for them see 248c7e7a4e3562fe3696956f15be83a79eac0d42 --- .gitlab-ci.yml | 3 ++- routes/profile.vue | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e992a2c6e..68b777da5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ check: stage: test image: node:latest before_script: + - set -o pipefail - export NODE_ENV=development - > start_section () { @@ -38,7 +39,7 @@ check: - end_section - start_section "Check linting rules" - - yarn lint --format gitlab --color --fix --quiet || record_failure + - yarn lint --format gitlab --color --fix | grep -v "^\S*warn" || record_failure - end_section - start_section "Check for fixable problems" diff --git a/routes/profile.vue b/routes/profile.vue index 35ce33234..9010252f0 100644 --- a/routes/profile.vue +++ b/routes/profile.vue @@ -369,11 +369,11 @@ export default { } } else { const customOpinion = profile.opinions[opinion]; - if (customOpinion !== undefined - && customOpinion.colour !== 'grey' - && customOpinion.style !== 'small' - && !['ban', 'slash'].includes(customOpinion.icon) - && !(customOpinion.icon || '').endsWith('-slash') + if (customOpinion !== undefined && + customOpinion.colour !== 'grey' && + customOpinion.style !== 'small' && + !['ban', 'slash'].includes(customOpinion.icon) && + !(customOpinion.icon || '').endsWith('-slash') ) { best.push(pronoun); }