KomodoEdit icon indicating copy to clipboard operation
KomodoEdit copied to clipboard

Javascript code formatting problem with arrow functions

Open blitz-research opened this issue 3 years ago • 2 comments

Hi,

I'm having a weird problem with the javascript code formatter, which I believe is called js-beautify.

It has decided to insert a space in the middle of all my arrow function arrows, so "=>" becomes "= >" which produces an error at runtime.

I can't find any relevant option in the js-beautify prefs in Komodo, so I've been looking for some kind of config file somewhere but with no success either.

Any ideas? Should I use a different beautifier?

Bye, Mark

blitz-research avatar May 29 '22 03:05 blitz-research

This seems to be due to 'built-in' version of js-beautify, as when I switched to a downloaded console version of js-beautify it worked fine.

blitz-research avatar May 31 '22 02:05 blitz-research

That sounds about right @blitz-research . The built in one is quite old and might even be from before arrow functions were introduced.

th3coop avatar Jun 06 '22 17:06 th3coop