feat(await-async-event): add basic fixer#656
feat(await-async-event): add basic fixer#656Belco90 merged 1 commit intotesting-library:alphafrom skovy:pr/await-async-event-fixer
Conversation
await-async-event basic fixer|
Waiting until #652 gets merged (you could point this PR to the branch from that PR to make explicit it's branched off from there). I'm happy without managing the async operator from the outer function. I think other autofixes from this plugin work that way. |
The only branch options are the ones in this repo, I think since that pull request is a branch from my fork I can't base it on that branch? I can wait for that one to be merged and I can clean up this PR after. |
|
🎉 This PR is included in version 6.0.0-alpha.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Fwiw, I think this fixer should either 1) convert the function to async or 2) refuse to fix the issue if the function isn't async. As-is, it just produces syntactically invalid code and requires manual attention in those cases anyways. |
Actually… I checked again our current fixable rules and there is none adding the It should be fairly easy to do this. What do you think @skovy? |
|
Thanks @Belco90 - I'll try to take a look at the issue over the next few days/weeks if someone doesn't get to it before that 👍 |
Checks
npm run generate:rules-list)npm run generate:configs)Changes
await-async-eventruleI was thinking if this fixer should update the
it/testto also beaysncif not, but that felt like out of the scope of this rule/fixer? It cares if it's awaited, not managing if it's an async function wrapping?Context
Branched off and a follow-up to #652 to make the migration easier to
user-eventv14.Related to one of the rules mentioned in #202.