Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: async-currenttarget/preventdefault doesn’t consider nested scopes#567

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
manuelpuyol merged 3 commits intogithub:mainfromkurtextrem:main
Dec 9, 2024

Conversation

kurtextrem
Copy link
Contributor

Hi! Thanks for the eslint rules. Really helpful.

We found the following example is not caught by the rules I've updated:

const myHandler = async (e) => {  await foo()  dummy(() => bar(e.currentTarget))}

The reason is, whileawait is in the scope ofmyHandler,currentTarget (orpreventDefault()) is not. To fix it, we have to walk up the scopes and figure out if a parent scope matches the scope whereawait was found.

MeLlamoPablo reacted with heart emoji
@kurtextremkurtextrem requested a review froma team as acode ownerOctober 31, 2024 16:03
@manuelpuyol
Copy link
Contributor

👋@kurtextrem thanks for the contribution! Would you mind updating the tests with a new example for this case?

@kurtextrem
Copy link
ContributorAuthor

👋@kurtextrem thanks for the contribution! Would you mind updating the tests with a new example for this case?

Done!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@manuelpuyolmanuelpuyolmanuelpuyol approved these changes

@graceparkgraceparkAwaiting requested review from graceparkgracepark is a code owner automatically assigned from github/web-systems-reviewers

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kurtextrem@manuelpuyol

[8]ページ先頭

©2009-2025 Movatter.jp