@putout/printer
Advanced tools
Comparing version 1.71.0 to 1.71.1
'use strict'; | ||
const {isNext} = require('./is'); | ||
const {markBefore, isMarkedAfter} = require('./mark'); | ||
const {markBefore} = require('./mark'); | ||
module.exports.parseLeadingComments = (path, {print, maybe, indent}) => { | ||
@@ -63,2 +62,7 @@ const {leadingComments} = path.node; | ||
maybe.indent(!sameLine); | ||
if (!isMarkedAfter(path) && !sameLine) { | ||
write.newline(); | ||
} | ||
write(`//${value}`); | ||
@@ -65,0 +69,0 @@ write.newline(); |
@@ -14,2 +14,3 @@ 'use strict'; | ||
} = require('@babel/types'); | ||
const {markAfter} = require('../mark'); | ||
@@ -49,2 +50,3 @@ const isFirstStatement = (path) => path.get('body.0')?.isStatement(); | ||
print.newline(); | ||
markAfter(path.parentPath); | ||
}, | ||
@@ -51,0 +53,0 @@ }; |
@@ -26,3 +26,6 @@ 'use strict'; | ||
if (spec.isImportSpecifier()) { | ||
const {imported, local} = spec.node; | ||
const { | ||
imported, | ||
local, | ||
} = spec.node; | ||
maybe.print(index, ', '); | ||
@@ -29,0 +32,0 @@ maybe.print(!wasSpecifier, '{'); |
{ | ||
"name": "@putout/printer", | ||
"version": "1.71.0", | ||
"version": "1.71.1", | ||
"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
102169
2682