[Bug]: With comments: false
, babel inserts an extra newline before the =>
of an arrow function
#15161
Labels
area: comments
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: generator
馃捇
How are you using Babel?
@babel/cli
Input code
Configuration file name
babel.config.json
Configuration
Browserslist is set to
["defaults"]
.Current and expected behavior
With
comments: false
, the following output is produced:which is not valid code. With
comments: true
, the following output is produced:which is valid. With
@babel/generator
version7.20.2
andcomments: false
, the following output is produced:which is valid, so this looks like a regression in version
7.20.3
(from #15135?).Environment
Possible solution
No response
Additional context
Maybe #15160 will also fix this, but there seems to be a gap in testing with
comments: false
.The text was updated successfully, but these errors were encountered: