From 83ddd30fe644168d59be0f958574ea88b17c18a8 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 11 Jan 2022 22:20:58 +0000 Subject: [PATCH] Enforce consistent indentation --- eslint/.eslintrc-magento | 1 + eslint/rules/utils.js | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/eslint/.eslintrc-magento b/eslint/.eslintrc-magento index 5d403da3..0ae1f657 100644 --- a/eslint/.eslintrc-magento +++ b/eslint/.eslintrc-magento @@ -18,6 +18,7 @@ "eol-last": 2, "eqeqeq": [2, "smart"], "guard-for-in": 2, + "indent": [2, 4], "keyword-spacing": [2, {}], "lines-around-comment": [ 2, diff --git a/eslint/rules/utils.js b/eslint/rules/utils.js index ae181210..398e2b86 100644 --- a/eslint/rules/utils.js +++ b/eslint/rules/utils.js @@ -75,18 +75,18 @@ function getExpressionId(node) { while (node) { switch (node.type) { - case 'CallExpression': - node = node.callee; - break; - - case 'MemberExpression': - node = node.object; - break; - - case 'Identifier': - return node; - default: - return null; + case 'CallExpression': + node = node.callee; + break; + + case 'MemberExpression': + node = node.object; + break; + + case 'Identifier': + return node; + default: + return null; } } }