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

Appearance settings

feat: support TypeScript syntax in class-methods-use-this #19498

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

JoshuaKGoldberg
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)

Continues #19431.

Adds tests to show that class-methods-use-this works with TypeScript syntax. Interestingly, there weren't any code changes in the rule itself needed besides meta.(dialects,language). It doesn't support any of typescript-eslint's TypeScript-syntax-specific options and so the core logic is still the same. Nifty.

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

I propose leaving the added options from https://typescript-eslint.io/rules/class-methods-use-this/#options for followup issues.

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Mar 10, 2025
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Mar 10, 2025
@github-actions github-actions bot added the rule Relates to ESLint's core rules label Mar 10, 2025
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 60f51d8
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/67cf553b3d45870008e782d8

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review March 10, 2025 21:14
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team as a code owner March 10, 2025 21:14
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, thanks. I agree, we can look at adding the other options later.

@nzakas nzakas merged commit be56a68 into eslint:main Mar 11, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Complete in Triage Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.