loganch / AutoIt-VSCode

AutoIt Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Damien.autoit
MIT License
74 stars 25 forks source link

prefixEmpty is not defined #181

Closed vanowm closed 1 year ago

vanowm commented 1 year ago

Change in df56da0 produce error when launching a script. Specifically line 263 should end with a comma, not semicolon:

const prefixId = `#${ id }:${ spacer}`,

P.S. It seems today's "cosmetic" changes only unnecessary worsen the overall performance...(like replacing for loops with anonymous function calls, or replacing template strings with replace calls...). It's microscopic performance change, but still, it adds up...

loganch commented 1 year ago

I totally get where you're coming from, and I appreciate your concern about all the changes. Just wanted to let you know that a lot of the cosmetic is stuff is due to ESLint/Prettier rules I added, based on Airbnb's standards. I was looking to challenge myself (and it is a challenge, continue statements make sense to me) to make the code consistent and get a small view of what a "professional" would look like. So, for files like ai_commands.js, ai_config.js and older stuff I haven't touched in a while the Problems tab is lit up and there are plenty of squiggly lines.

The other changes were attempts to make things a bit more understandable and documented (I like being able to hover and having the IntelliSense from the JSDoc stuff), especially with the way I'm prone to not have dealt with the code for a while.

As for performance, I would point out that at the end everything is compiled to ES5 through babel.js for dev, and even further minified and condensed for release. That, of course, doesn't cover everything, so I understand that there are better ways to approach things and am open to suggestions, feedback and pull requests.

Thanks for bringing this up, and feel free to let me know if you have any other concerns or ideas for improvements!