@putout/printer
Advanced tools
Comparing version 8.35.2 to 8.36.0
@@ -36,2 +36,3 @@ 'use strict'; | ||
const isVar = consequent.isVariableDeclaration(); | ||
const isRet = consequent.isReturnStatement(); | ||
@@ -38,0 +39,0 @@ if (isConsequentBlock) { |
@@ -16,2 +16,4 @@ 'use strict'; | ||
const isInsideIfWithElse = ({parentPath}) => parentPath.isIfStatement() && parentPath.node.alternate; | ||
module.exports.ReturnStatement = { | ||
@@ -44,2 +46,5 @@ beforeIf(path) { | ||
afterIf: (path) => { | ||
if (isInsideIfWithElse(path)) | ||
return true; | ||
if (isLast(path)) | ||
@@ -46,0 +51,0 @@ return false; |
{ | ||
"name": "@putout/printer", | ||
"version": "8.35.2", | ||
"version": "8.36.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
221221
4900