-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(await-async-event): add basic fixer #656
feat(await-async-event): add basic fixer #656
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skovy thank you for adding the autofix implementation for this rule!
🎉 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-event
ruleI was thinking if this fixer should update the
it
/test
to also beaysnc
if 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-event
v14.Related to one of the rules mentioned in #202.