From 29a9deaeb85a0f95c8a9bbc4084057649f5cfc16 Mon Sep 17 00:00:00 2001 From: Alys Date: Sun, 18 Mar 2018 06:13:55 +1000 Subject: [PATCH] prevent lint indent warning on multi-line reduce function (#10145) --- website/common/script/fns/randomDrop.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/common/script/fns/randomDrop.js b/website/common/script/fns/randomDrop.js index 3156c82590..deaf0127b3 100644 --- a/website/common/script/fns/randomDrop.js +++ b/website/common/script/fns/randomDrop.js @@ -41,9 +41,9 @@ module.exports = function randomDrop (user, options, req = {}, analytics) { (1 + (user.contributor.level / 40 || 0)) * // Contrib levels: +2.5% per level (1 + (user.achievements.rebirths / 20 || 0)) * // Rebirths: +5% per achievement (1 + (user.achievements.streak / 200 || 0)) * // Streak achievements: +0.5% per achievement - (user._tmp.crit || 1) * (1 + 0.5 * (reduce(task.checklist, (m, i) => { - return m + (i.completed ? 1 : 0); // +50% per checklist item complete. TODO: make this into X individual drop chances instead - }, 0) || 0)); + (user._tmp.crit || 1) * (1 + 0.5 * (reduce(task.checklist, (m, i) => { // +50% per checklist item complete. TODO: make this into X individual drop chances instead + return m + (i.completed ? 1 : 0); // eslint-disable-line indent + }, 0) || 0)); // eslint-disable-line indent chance = diminishingReturns(chance, 0.75); if (predictableRandom() < chance) {