@putout/printer
Advanced tools
Comparing version 8.0.1 to 8.1.0
@@ -50,2 +50,11 @@ 'use strict'; | ||
const isSiblingIsArray = (path) => { | ||
if (path.getNextSibling().isArrayExpression()) | ||
return true; | ||
return path | ||
.getPrevSibling() | ||
.isArrayExpression(); | ||
}; | ||
module.exports.isMultiLine = (path, {elements, maxElementsInOneLine}) => { | ||
@@ -109,2 +118,5 @@ if (elements.length > 3 && !isObjectExpression(elements[0])) | ||
if (isSiblingIsArray(path)) | ||
return ONE_LINE; | ||
if (tooLong(path) || isCoupleLines(path) || !isNumbers(elements) && !isForOf(path) && isLastArg(path) && !isParentProperty(path)) | ||
@@ -111,0 +123,0 @@ return MULTI_LINE; |
{ | ||
"name": "@putout/printer", | ||
"version": "8.0.1", | ||
"version": "8.1.0", | ||
"type": "commonjs", | ||
@@ -49,3 +49,3 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"@babel/plugin-codemod-object-assign-to-object-spread": "^7.10.4", | ||
"@putout/plugin-minify": "^7.1.1", | ||
"@putout/plugin-minify": "^8.0.0", | ||
"@putout/plugin-printer": "^3.0.0", | ||
@@ -69,3 +69,3 @@ "@putout/plugin-promises": "^14.0.0", | ||
"putout": "^35.0.0", | ||
"supertape": "^9.0.0", | ||
"supertape": "^10.0.0", | ||
"try-catch": "^3.0.0", | ||
@@ -72,0 +72,0 @@ "typescript": "^5.3.3" |
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
205374
4599