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

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

Merged
gracepark merged 2 commits intomainfromupdate-flat-config-rules
Jan 6, 2025
Merged

Conversation

gracepark
Copy link
Contributor

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:

/workspaces/eslint-plugin-github/test-examples/flat/src/forEachTest.js  1:1  error  Filename 'forEachTest.js' does not match the regex naming convention  github/filenames-match-regex/workspaces/eslint-plugin-github/test-examples/flat/src/getAttribute.js  13:3   error  event.preventDefault() inside an async function is error prone                  github/async-preventdefault  21:4   error  "scroll" event listener is not cancellable and so `passive: true` does nothing  github/no-useless-passive  30:16  error  event.currentTarget inside an async function is error prone                     github/async-currenttarget

@graceparkgracepark self-assigned thisJan 6, 2025
@CopilotCopilotAI review requested due to automatic review settingsJanuary 6, 2025 16:31
@graceparkgracepark requested a review froma team as acode ownerJanuary 6, 2025 16:31
Copy link

@CopilotCopilotAI left a 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')
Copy link
Preview

CopilotAIJan 6, 2025

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.

Suggested change
consttext=event.currentTarget.getAttribute('data-text')
if(event.currentTarget===null)return;
consttext=event.currentTarget.getAttribute('data-text')

Copilot uses AI. Check for mistakes.

@graceparkgracepark merged commit1b65401 intomainJan 6, 2025
7 checks passed
@graceparkgracepark deleted the update-flat-config-rules branchJanuary 6, 2025 22:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@manuelpuyolmanuelpuyolmanuelpuyol approved these changes

Assignees

@graceparkgracepark

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

TypeError: context.getScope is not a function (ESLint 9 compatibility issues)
2 participants
@gracepark@manuelpuyol

[8]ページ先頭

©2009-2025 Movatter.jp