When creating private fields in javascript classes this formatter adds a newline between the # and the variable name. This results in invalid javascript code.
Example
The code
class MyClass {
#myPrivateField = 'some value';
}
is turned into
class MyClass {
#
myPrivateField = 'some value';
}
on save. This is invalid javascript.
Further Information
To find out more about private fields in javascript classes, see section Private field declarations on mdn/JS/Classes.
Suggested Workaround
Since this extension is hardly maintained I suggest moving on from it and switching to an alternative like Prettier - Code formatter. Keep in mind that with every formatter the code looks a little different and you might have to change some settings in order for the code to look just the way you prefer.
Description
When creating private fields in javascript classes this formatter adds a newline between the
#
and the variable name. This results in invalid javascript code.Example
The code
is turned into
on save. This is invalid javascript.
Further Information
To find out more about private fields in javascript classes, see section
Private field declarations
on mdn/JS/Classes.Suggested Workaround
Since this extension is hardly maintained I suggest moving on from it and switching to an alternative like Prettier - Code formatter. Keep in mind that with every formatter the code looks a little different and you might have to change some settings in order for the code to look just the way you prefer.