From 101a82f60954932a6704cec95886a3ffda52413f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Pereira=20Mu=C3=B1oz?= Date: Sun, 4 Aug 2024 22:24:42 +0200 Subject: [PATCH] Fix Eslint issues --- src/utilities/rules.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/utilities/rules.ts b/src/utilities/rules.ts index 16ef77ab..0d950282 100644 --- a/src/utilities/rules.ts +++ b/src/utilities/rules.ts @@ -229,10 +229,18 @@ export const removeEmptyRules = (rule: Container): void => { export const appendRules = (): void => { const { rules } = store; rules.forEach(({rule, ruleLTR, ruleRTL, ruleBoth, ruleSafe}): void => { - ruleBoth.nodes.length && rule.after(ruleBoth); - ruleRTL.nodes.length && rule.after(ruleRTL); - ruleLTR.nodes.length && rule.after(ruleLTR); - ruleSafe.nodes.length && rule.after(ruleSafe); + if (ruleBoth.nodes.length) { + rule.after(ruleBoth); + } + if (ruleRTL.nodes.length) { + rule.after(ruleRTL); + } + if (ruleLTR.nodes.length) { + rule.after(ruleLTR); + } + if (ruleSafe.nodes.length) { + rule.after(ruleSafe); + } removeEmptyRules(rule); cleanRules(rule, ruleLTR, ruleRTL, ruleBoth, ruleSafe); });