@putout/printer 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog
CHANGED
package/lib/tokenize/is.js
CHANGED
|
@@ -123,6 +123,12 @@ function notLastPrevVarNotNextVar(path) {
|
|
|
123
123
|
const prev = path.getPrevSibling();
|
|
124
124
|
const next = path.getNextSibling();
|
|
125
125
|
|
|
126
|
+
if (!exists(prev.getPrevSibling()))
|
|
127
|
+
return false;
|
|
128
|
+
|
|
129
|
+
if (path.node.loc?.start.line === prev.node?.loc?.start.line + 2)
|
|
130
|
+
return false;
|
|
131
|
+
|
|
126
132
|
return !isLast(path) && prev.isVariableDeclaration() && !next.isVariableDeclaration();
|
|
127
133
|
}
|
|
128
134
|
|
package/package.json
CHANGED