From 8ed37bb1f2d0e340aa0636e9bcb7285eb50c891f Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Fri, 29 Jan 2021 14:41:01 -0500 Subject: [PATCH] apply condition to avoid extra indenting with offsetTernaryExpressions Co-authored-by: Adam Stankiewicz --- lib/rules/indent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rules/indent.js b/lib/rules/indent.js index 1c0dccc5c98..8f4079d31f9 100644 --- a/lib/rules/indent.js +++ b/lib/rules/indent.js @@ -1178,6 +1178,7 @@ module.exports = { offsets.setDesiredOffset(colonToken, firstToken, 1); offsets.setDesiredOffset(firstConsequentToken, firstToken, + firstConsequentToken.type === "Punctuator" && options.offsetTernaryExpressions ? 2 : 1); /*