- Notifications
You must be signed in to change notification settings - Fork59
Update rules for flat config#596
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- lib/rules/async-currenttarget.js: Evaluated as low risk
Tip: Turn on automatic Copilot reviews for this repository to get quick feedback on every pull request.Learn more
const data = await fetch(url) | ||
// But now, event.currentTarget will be null | ||
const text = event.currentTarget.getAttribute('data-text') |
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.
event.currentTarget might be null after the await call. Add a null check before accessing getAttribute.
consttext=event.currentTarget.getAttribute('data-text') | |
if(event.currentTarget===null)return; | |
consttext=event.currentTarget.getAttribute('data-text') |
Copilot uses AI. Check for mistakes.
1b65401
intomainUh oh!
There was an error while loading.Please reload this page.
Closes:#589
This now updates the rules as ESLint has updated the rules API for custom rules:https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/
Tested and looks like it's now working as expected: