adobe / adobe/generator-aio-app
Generated Code + Semicolons
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
### 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:
- 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
Contributor guide
Research direction
Start with the `aio app:init` entry point and inspect the Yeoman-generated function examples. Determine whether the examples should use semicolons or include default ESLint tooling, then verify that a newly generated functions-only app reflects the chosen approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100