JavaScript is barely acceptable on the web, but again it’s a necessary evil as you can’t easily use anything else.
But why use an inadequate tool on the desktop? The perceived time you save upfront would backfire later on.
Now I’m not saying go and spend a year learning another language just to make a side project (by all means use JS or whatever you’re familiar with), but if you’re making a production-grade app, PLEASE use the right tool for the job and it ain’t JS.
I, for one, am sick of JS & Electron contaminating apps I use daily like Spotify, Slack, Signal, Telegram, etc. I wouldn’t mind it too much if this was a niche thing and there were alternatives, but there aren’t. JS on the desktop should die.