We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
next-tick-style
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
What rule do you want to change?
Does this change cause the rule to produce more or fewer warnings?
No.
How will the change be implemented? (New option, new default behavior, etc.)?
If inside async function, provide autofix, otherwise no fix.
async
Please provide some example code that this change will affect:
<script setup> const foo = () => { nextTick(() => { // ... }) } </script>
What does the rule currently do for this code?
Fixes my code to nextTick().then(...)
nextTick().then(...)
What will the rule do after it's changed?
Enforce await nextTick()
await nextTick()
Additional context
I want the promise style use of nextTick(), but I don't want it fix to nextTick().then, I want await nextTick().
nextTick()
nextTick().then
The text was updated successfully, but these errors were encountered:
You could use eslint-plugin-promise's prefer-await-to-then rule.
eslint-plugin-promise
prefer-await-to-then
However, improving the autofix to use await nextTick() inside functions that are already async seems like a good idea to me. PR welcome for that!
Sorry, something went wrong.
@FloEdelmann I'd like to pick this up
Sure, go ahead 🙂
@FloEdelmann I've submitted a PR 😄
Successfully merging a pull request may close this issue.
What rule do you want to change?
next-tick-style
Does this change cause the rule to produce more or fewer warnings?
No.
How will the change be implemented? (New option, new default behavior, etc.)?
If inside
async
function, provide autofix, otherwise no fix.Please provide some example code that this change will affect:
What does the rule currently do for this code?
Fixes my code to
nextTick().then(...)
What will the rule do after it's changed?
Enforce
await nextTick()
Additional context
I want the promise style use of
nextTick()
, but I don't want it fix tonextTick().then
, I wantawait nextTick()
.The text was updated successfully, but these errors were encountered: