@putout/printer
Advanced tools
Comparing version 8.31.0 to 8.32.0
@@ -21,2 +21,1 @@ 'use strict'; | ||
}; | ||
@@ -176,9 +176,11 @@ 'use strict'; | ||
const fnParam = isFunctionParam(path); | ||
if (moreCount && !moreLength) | ||
return ONE_LINE; | ||
if (!isForOf(path) && !path.parentPath.isFunction() && n && checkLength(properties)) | ||
if (!fnParam && n && !isForOf(path) && checkLength(properties)) | ||
return COUPLE_LINES; | ||
if (hasAssign(properties)) | ||
if (!fnParam && hasAssign(properties)) | ||
return COUPLE_LINES; | ||
@@ -188,1 +190,13 @@ | ||
} | ||
function isFunctionParam(path) { | ||
const {parentPath} = path; | ||
if (parentPath.isFunction()) | ||
return true; | ||
if (!parentPath.isAssignmentPattern()) | ||
return false; | ||
return parentPath.parentPath.isFunction(); | ||
} |
{ | ||
"name": "@putout/printer", | ||
"version": "8.31.0", | ||
"version": "8.32.0", | ||
"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
219125
4861