@putout/printer
Advanced tools
Comparing version 1.15.0 to 1.15.1
@@ -36,3 +36,3 @@ 'use strict'; | ||
maybe.print(isNewLine && elements.length, '\n'); | ||
maybe.print.newline(isNewLine && elements.length); | ||
@@ -42,3 +42,4 @@ for (const [index, element] of elements.entries()) { | ||
print(element); | ||
maybe.print(isNewLine, ',\n'); | ||
maybe.print(isNewLine, ','); | ||
maybe.print.newline(isNewLine); | ||
maybe.print(!isNewLine && index < n, ', '); | ||
@@ -92,2 +93,5 @@ } | ||
if (isInsideCallLoop(path)) | ||
return false; | ||
if (elements[0].isObjectExpression()) | ||
@@ -117,2 +121,5 @@ return true; | ||
function isNewlineBetweenElements(path, {elements}) { | ||
if (isInsideCallLoop(path)) | ||
return false; | ||
if (isIncreaseIndent(path)) | ||
@@ -143,1 +150,10 @@ return false; | ||
function isInsideCallLoop(path) { | ||
if (!path.parentPath.isCallExpression()) | ||
return false; | ||
if (!path.parentPath.parentPath.isForOfStatement()) | ||
return false; | ||
return true; | ||
} |
{ | ||
"name": "@putout/printer", | ||
"version": "1.15.0", | ||
"version": "1.15.1", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59273
1690