chore: enforce arrow style functions#2149
Conversation
02bb55f to
52454b9
Compare
1 flaky tests on run #3069 ↗︎Details:
|
|||||||||||||||||||||
| Test | Artifacts | |
|---|---|---|
| [Common] > [User Menu] > [By Authenticated] |
Output
Screenshots
|
|
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
AlfonsoGhislieri
left a comment
There was a problem hiding this comment.
Praise @thisislawatts this was so satisfying to look at! Looks good to me 👍🏻
The only thing I was worried about was the implicit returns like mentioned here, but it seems that all the non one liners are wrapped in parathenses which should not cause any issues.
There was a problem hiding this comment.
Looks good to me also, I similarly took a quick google of any use-cases when it might be better to keep function notation and couldn't find any examples in the changes mentioned so say should be good to go once conflicts resolved (will take a quick look)
https://www.javascripttutorial.net/es6/when-you-should-not-use-arrow-functions
…into chore/enforce-arrow-style-functions
|
Thanks @chrismclarke, I think the quickest way to do this would be drop 52454b9, then rebase against master addressing any merge conflicts on |
…into chore/enforce-arrow-style-functions
Dropping commits extends a bit beyond my git-foo, so for now I've just manually resolved for a second time (expect a few minor conflicts like this as trying to get more of the backlog merged in) - cool to know it auto-formats the rule though, I've just re-run on the merged branch and no new changes detected so will merge ahead of other PRs once tests complete |
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR Checklist
PR Type
Description
An exploration at using automation to standardise on arrow style function declaration. Based on the following comment in another PR.
What happens next?
Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).
If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.
If you need more immediate feedback you can try reaching out on Discord in the Community Platform
developmentchannel.