From cddbb959f13aa29a7264174b1fc4eaa4271cf900 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Mon, 3 Apr 2023 21:14:12 +0200 Subject: chore: activate eslint no-else-return (#2009) --- src/modules/word/filterWordListByLength.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/word') diff --git a/src/modules/word/filterWordListByLength.ts b/src/modules/word/filterWordListByLength.ts index ca312371..4651d497 100644 --- a/src/modules/word/filterWordListByLength.ts +++ b/src/modules/word/filterWordListByLength.ts @@ -87,12 +87,12 @@ export function filterWordListByLength(options: { if (typeof length === 'number') { return STRATEGIES[strategy](wordList, { min: length, max: length }); - } else { - return STRATEGIES[strategy](wordList, length); } + + return STRATEGIES[strategy](wordList, length); } else if (strategy === 'shortest' || strategy === 'longest') { return STRATEGIES[strategy](wordList); - } else { - return [...wordList]; } + + return [...wordList]; } -- cgit v1.2.3