You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! We're starting to work on some integrations with I/O functions on the Magento side of things, and I spun up a new functions-only app with aio app:init.
I noticed that the example functions pulled in by the Yeoman generator are currently going semi-less. I definitely am not looking to start a debate of which style is better.
However, Magento has a lot of folks that don't consider JS their primary language (employees and system integrators), and this can cause some surprises when folks are first attempting to onboard to I/O.
As an example, I helped a co-worker debug their function for about ~30 minutes the other day - I totally missed the missing semi they had after an IIFE, which ended up creating some surprising results.
I would love to see us improve in one of the following 2 ways:
Terminate statements with semicolons
OR
Include ESLint with a default configuration that'll catch common ASI footguns
My own preference would be to add semis to the examples. I think a decent number of folks starting that don't have a JS background won't know what ESLint is, and likely won't have the editor plugin installed when they start up. Eliminating a foot gun for those folks could make the onboarding experience more seamless.
Actual Behaviour
No semis, no tooling to catch mistakes
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered:
+1 to generation of eslint config, and using the standard config (eslint-config-standard)
The user can then change the eslint config to the desired one if needed
Expected Behaviour
Hey! We're starting to work on some integrations with I/O functions on the Magento side of things, and I spun up a new functions-only app with
aio app:init
.I noticed that the example functions pulled in by the Yeoman generator are currently going semi-less. I definitely am not looking to start a debate of which style is better.
However, Magento has a lot of folks that don't consider JS their primary language (employees and system integrators), and this can cause some surprises when folks are first attempting to onboard to I/O.
As an example, I helped a co-worker debug their function for about ~30 minutes the other day - I totally missed the missing semi they had after an IIFE, which ended up creating some surprising results.
I would love to see us improve in one of the following 2 ways:
OR
My own preference would be to add semis to the examples. I think a decent number of folks starting that don't have a JS background won't know what ESLint is, and likely won't have the editor plugin installed when they start up. Eliminating a foot gun for those folks could make the onboarding experience more seamless.
Actual Behaviour
No semis, no tooling to catch mistakes
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: