From 158edf538894f94bb2daf07166a20802fdb0ba8e Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 18 Oct 2017 10:57:26 -0200 Subject: [PATCH] typo: ident -> indent --- src/printer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/printer.js b/src/printer.js index c2cdb79a..cbe52eae 100644 --- a/src/printer.js +++ b/src/printer.js @@ -343,8 +343,8 @@ function genericPrintNoParens(path, options, print, args) { } // Avoid indenting sub-expressions in some cases where the first sub-expression is already - // idented accordingly. We should ident sub-expressions where the first case isn't idented. - const shouldNotIdent = + // indented accordingly. We should indent sub-expressions where the first case isn't indented. + const shouldNotIndent = parent.type === "ReturnStatement" || (parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute") || @@ -353,7 +353,7 @@ function genericPrintNoParens(path, options, print, args) { (parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement"); - const shouldIdentIfInlining = + const shouldIndentIfInlining = parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ObjectProperty" || @@ -363,9 +363,9 @@ function genericPrintNoParens(path, options, print, args) { isBinaryish(n.left) && util.shouldFlatten(n.operator, n.left.operator); if ( - shouldNotIdent || + shouldNotIndent || (shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression) || - (!shouldInlineLogicalExpression(n) && shouldIdentIfInlining) + (!shouldInlineLogicalExpression(n) && shouldIndentIfInlining) ) { return group(concat(parts)); }