Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [class-methods-use-this] detect a problematic case for private/protected members ifignoreClassesThatImplementAnInterface
is set#7705
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
Thanks for the PR,@tetsuharuohzeki! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedSep 30, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedSep 30, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
4d4e714
tod4b5aaf
CompareConverting to draft since the linked issue hasn't been accepted yet. Let's continue conversation there. |
80b3efe
to3625d70
CompareThere 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.
OK! This looks great to me - just one docs suggestion from me. What do you think@tetsuharuohzeki?
Thanks for waiting btw - I'm excited about this option!
| 'public-fields' | ||
/** Ignore classes that specifically implement some interface */ |
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.
Hmm, this looks a little off... outside the scope of this PR.
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.
I tried to remove its comment but I seemnx run eslint-plugin:test
generate it...
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.
I tried to add more descriptions but it cannot remove extra comments.
7390468
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.
Yeah I think this is just something odd in the repository, separate from your changes. No worries. Thanks for trying though!
Uh oh!
There was an error while loading.Please reload this page.
3625d70
to7390468
CompareThere 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.
Swell, thanks!
I introduced a merge conflict on |
…matic case for private/protected members if `ignoreClassesThatImplementAnInterface` is set
ignoreClassesThatImplementAnInterface
istrue
ignoreClassesThatImplementAnInterface
is set42e2148
tob7beb57
CompareThank you for your review! I rebase my change sets on the latest main! |
Amazing, thanks! Saved me a bit of time wrestling with it locally. 🙂 |
@JoshuaKGoldberg Thank you for accepting my patch. |
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
ignoreClassesThatImplementAnInterface
option istrue
#7704Overview
Thisfixes#7704.
TypeScript's interface feature does not have any private/protected member as a part of it.
So the rule
class-methods-use-this
enabling ignoreClassesThatImplementAnInterface=true should warn the case of that the implementation is not a part of interface.