Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.14k stars 299 forks source link

Javascript code formatting problem with arrow functions #3953

Open blitz-research opened 2 years ago

blitz-research commented 2 years ago

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 commented 2 years ago

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.

th3coop commented 2 years ago

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