aboutsummaryrefslogtreecommitdiff
path: root/src/modules/word
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-04-03 21:14:12 +0200
committerGitHub <[email protected]>2023-04-03 19:14:12 +0000
commitcddbb959f13aa29a7264174b1fc4eaa4271cf900 (patch)
tree8300b70595bb2effd9f4ac22dd98203c61d1f3c5 /src/modules/word
parent71232ba04616e9ef098b7bf088b07f05b014e1d9 (diff)
downloadfaker-cddbb959f13aa29a7264174b1fc4eaa4271cf900.tar.xz
faker-cddbb959f13aa29a7264174b1fc4eaa4271cf900.zip
chore: activate eslint no-else-return (#2009)
Diffstat (limited to 'src/modules/word')
-rw-r--r--src/modules/word/filterWordListByLength.ts8
1 files changed, 4 insertions, 4 deletions
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];
}