@putout/printer
Advanced tools
@@ -67,3 +67,3 @@ 'use strict'; | ||
if (length > 1 || manyLines) { | ||
if (noTrailingComment(property) && (length > 1 || manyLines)) { | ||
maybe.print(index !== n || trailingComma, ','); | ||
@@ -85,4 +85,4 @@ print.newline(); | ||
if (!hasNextLeadingComment(property)) { | ||
maybe.print.newline(manyLines && noTrailingComment(property)); | ||
if (noTrailingComment(property) && !hasNextLeadingComment(property)) { | ||
maybe.print.newline(manyLines); | ||
maybe.print.linebreak(isNewlineBetweenSiblings(property)); | ||
@@ -89,0 +89,0 @@ } |
'use strict'; | ||
const {hasTrailingComment} = require('../is'); | ||
module.exports.SpreadElement = (path, printer) => { | ||
@@ -7,2 +8,5 @@ const {print} = printer; | ||
print('__argument'); | ||
if (hasTrailingComment(path)) | ||
print(','); | ||
}; |
{ | ||
"name": "@putout/printer", | ||
"version": "6.8.1", | ||
"version": "6.8.2", | ||
"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
197597
0.11%4464
0.07%