Skip to content

Conversation

sethamus
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 changes did you make? (Give an overview)

Added two new options to the class-methods-use-this rule:

  • ignoreOverrideMethods ignores members that are marked with the override modifier.
  • ignoreClassesWithImplements ignores class members that are defined within a class that implements an interface.

Closes #19506
Closes #19507

@sethamus sethamus requested a review from a team as a code owner March 16, 2025 22:08
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Mar 16, 2025
Copy link

linux-foundation-easycla bot commented Mar 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@eslint-github-bot
Copy link

Hi @sethamus!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The length of the commit message must be less than or equal to 72

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

@github-actions github-actions bot added the rule Relates to ESLint's core rules label Mar 16, 2025
Copy link

netlify bot commented Mar 16, 2025

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit f202e6c
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/67de9f6a2de73d0008c88d66
😎 Deploy Preview https://deploy-preview-19527--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sethamus sethamus changed the title feat: add ignoreOverrideMethods and ignoreClassesWithImplements options to class-methods-use-this feat: add new options to class-methods-use-this Mar 17, 2025
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Mar 17, 2025
@sethamus
Copy link
Contributor Author

CI is failing because ts is not a standard language tag. I will open a new PR to address this.

@nzakas nzakas requested a review from JoshuaKGoldberg March 17, 2025 14:27
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.

This looks really good. Just left a couple notes to clean things up a bit.

@nzakas nzakas moved this from Needs Triage to Implementing in Triage Mar 17, 2025
@nzakas
Copy link
Member

nzakas commented Mar 17, 2025

Please double-check the lint errors.

sethamus and others added 2 commits March 17, 2025 18:36
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
@sethamus
Copy link
Contributor Author

Please double-check the lint errors.

These will be fixed by merging my closed PR or Josh's PR.

@JoshuaKGoldberg
Copy link
Contributor

👋 Temporary notice, I'm about to merge #19355 chore: formatted files with Prettier via trunk fmt. We should hold off on merging other PRs till it's done. I'll post back soon to confirm we're clear. Cheers!
(context: #19355 (comment))

@JoshuaKGoldberg
Copy link
Contributor

We're clear! main is now formatted with Prettier via trunk fmt.

To get rid of these merge conflicts, you can merge from main and use branch's versions of all the conflicted files. Making a new commit should trigger auto-formatting.

git merge -X ours main

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!

Leaving it open for 2nd review.

@snitin315 snitin315 moved this from Implementing to Second Review Needed in Triage Mar 22, 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.

🚀

@JoshuaKGoldberg JoshuaKGoldberg moved this from Second Review Needed to Merge Candidates in Triage Mar 24, 2025
@snitin315
Copy link
Contributor

Will merge once we determine if a patch release is needed or not.

@fasttime fasttime merged commit 30ae4ed into eslint:main Mar 24, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Merge Candidates to Complete in Triage Mar 24, 2025
@sethamus sethamus deleted the class-methods-use-this branch April 17, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor pool feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
Status: Complete
5 participants