From a073aaa7aed349b4f726a98d341c00e93505b61f Mon Sep 17 00:00:00 2001 From: Andrei Andreev Date: Sun, 31 Mar 2019 00:30:27 +0300 Subject: [PATCH] ESLint: Relax no-confusing-arrow rule by allowing parens --- .eslintrc.json | 7 ++++++- javascripts/core/rm.js | 11 +++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f82b51c45..48cda86e1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -187,7 +187,12 @@ "as-needed" ], "arrow-spacing": "error", - "no-confusing-arrow": "error", + "no-confusing-arrow": [ + "error", + { + "allowParens": true + } + ], "no-duplicate-imports": "error", "no-useless-computed-key": "error", "no-useless-constructor": "error", diff --git a/javascripts/core/rm.js b/javascripts/core/rm.js index 1e268f3ef..495197aba 100644 --- a/javascripts/core/rm.js +++ b/javascripts/core/rm.js @@ -793,12 +793,10 @@ class RebuyableRealityUpgradeState extends RealityUpgradeState { return this.config.cost(); } - // eslint-disable-next-line class-methods-use-this get isBought() { return false; } - // eslint-disable-next-line class-methods-use-this get canBeApplied() { return true; } @@ -810,12 +808,9 @@ class RebuyableRealityUpgradeState extends RealityUpgradeState { RealityUpgradeState.list = mapGameData( GameDatabase.reality.upgrades, - // eslint-disable-next-line arrow-body-style - config => { - return config.id < 6 ? - new RebuyableRealityUpgradeState(config) : - new RealityUpgradeState(config); - } + config => (config.id < 6 + ? new RebuyableRealityUpgradeState(config) + : new RealityUpgradeState(config)) ); /**