Skip to content

Commit

Permalink
apply condition to avoid extra indenting with offsetTernaryExpressions
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Stankiewicz <sheerun@sher.pl>
  • Loading branch information
brodybits and sheerun committed Jan 29, 2021
1 parent 266a06d commit 8ed37bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rules/indent.js
Expand Up @@ -1178,6 +1178,7 @@ module.exports = {
offsets.setDesiredOffset(colonToken, firstToken, 1);

offsets.setDesiredOffset(firstConsequentToken, firstToken,
firstConsequentToken.type === "Punctuator" &&
options.offsetTernaryExpressions ? 2 : 1);

/*
Expand Down

0 comments on commit 8ed37bb

Please sign in to comment.