From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/bip/index.js | 4 +--- recipes/bip/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'recipes/bip') diff --git a/recipes/bip/index.js b/recipes/bip/index.js index 4507e72..8949ee0 100644 --- a/recipes/bip/index.js +++ b/recipes/bip/index.js @@ -1,3 +1 @@ -module.exports = Ferdi => class bip extends Ferdi { - -}; +module.exports = Ferdi => class bip extends Ferdi {}; diff --git a/recipes/bip/webview.js b/recipes/bip/webview.js index ea8fa5f..f3166ce 100644 --- a/recipes/bip/webview.js +++ b/recipes/bip/webview.js @@ -6,8 +6,8 @@ module.exports = Ferdi => { const getMessages = () => { const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter'); let count = 0; - for (let i = 0; i < elements.length; i++) { - count += Ferdi.safeParseInt(elements[i].textContent); + for (const element of elements) { + count += Ferdi.safeParseInt(element.textContent); } Ferdi.setBadge(count, 0); }; -- cgit v1.2.3-70-g09d2