Skip to content

Conversation

DMartens
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What rule do you want to change?
accessor-pairs and grouped-accessor-pairs.
Fixes #19860.

What change do you want to make (place an "X" next to just one item)?

[x] Generate more warnings
[ ] Generate fewer warnings
[ ] Implement autofix
[ ] Implement suggestions

How will the change be implemented (place an "X" next to just one item)?

[x] A new option
[ ] A new default behavior
[ ] Other

Please provide some example code that this change will affect:

interface I {
	get prop(): any
}

What does the rule currently do for this code?
Unchecked

What will the rule do after it's changed?
Also check getters and setters in interfaces and type literals

What changes did you make? (Give an overview)

  • Conditionally check accessors via option enforceForTSTypes for both rules
  • Add support for TSMethodSignature in the utility functions getFunctionNameWithKind and getStaticPropertyName

Is there anything you'd like reviewers to focus on?

No

@DMartens DMartens requested a review from a team as a code owner June 24, 2025 19:12
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 24, 2025
Copy link

netlify bot commented Jun 24, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit d621e17
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/6876c7557a5a1100081e6c5b

@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Jun 24, 2025
@github-actions github-actions bot added the rule Relates to ESLint's core rules label Jun 24, 2025
@lumirlumir
Copy link
Member

Hi @DMartens, could you take a look at the CI failure?

It’s currently throwing some errors related to Markdown files.

@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jun 25, 2025
@snitin315 snitin315 moved this from Needs Triage to Implementing in Triage Jul 2, 2025
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changes Jul 8, 2025
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! 🙌

I'm not sure what the intent with the typeof context.options[0] === "string" check was, so just leaving one suggestion there. I'm not confident in it. 🙂

@JoshuaKGoldberg JoshuaKGoldberg moved this from Implementing to Second Review Needed in Triage Jul 8, 2025
nzakas
nzakas previously approved these changes Jul 10, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like @JoshuaKGoldberg to review before merging.

@snitin315
Copy link
Contributor

@DMartens can you also update the corresponding rule types with the newly added options?

Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! 🙌

@DMartens DMartens dismissed stale reviews from JoshuaKGoldberg and nzakas via d621e17 July 15, 2025 21:25
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@snitin315 snitin315 merged commit 0e957a7 into eslint:main Jul 17, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion contributor pool feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Rule Change: accessor-pairs and grouped-accessor-pairs should support types
6 participants