From fbbaf3dd3accc6077413b99b2ce2f0976fb83d5f Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 21 Oct 2020 22:02:04 +0200 Subject: [PATCH] Alter no-mixed-operators rule Change the rule for mixed operators to allow basic arithmetic and boolean logic. --- .eslintrc.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index bfc5b434..ff5a0c5b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -150,7 +150,16 @@ module.exports = { "no-lonely-if": "error", "no-loop-func": "error", "no-magic-numbers": "off", - "no-mixed-operators": "warn", + "no-mixed-operators": [ + "error", + { + "groups": [ + ["&", "|", "^", "~", "<<", ">>", ">>>"], + ["==", "!=", "===", "!==", ">", ">=", "<", "<="], + ["in", "instanceof"], + ], + }, + ], "no-mixed-requires": "error", "no-multi-assign": "error", "no-multi-spaces": "error",