3 ms·
Show HN: ESLint-plugin-no-else-if
- beanjuiceII 11mo agoseems silly
- theamk 11mo agoWow, the author is serious, it does not seem to be a joke! I've checked their last commit on github[0] and it has those lines: if (hasValidRate) { audio.playbackRate = playbackRate; } if (!hasValidRate && lastAudio === urlOrDataURI) { audio.playbackRate = 0.6; } If I was code-reviewing this code, I'd recommend using else-if here, for easier understanding and to avoid accidental mistakes. [0] https://github.com/RickCarlino/KoalaCards/commit/0750a32923729d21b8cae2a9822659ae6c988891 https://github.com/RickCarlino/KoalaCards/commit/0750a329237...