-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [no-unused-private-class-members] new extension rule #10265
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
feat(eslint-plugin): [no-unused-private-class-members] new extension rule #10265
Conversation
Thanks for the PR, @Zamiell! 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 on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
View your CI Pipeline Execution ↗ for commit 684c009.
☁️ Nx Cloud last updated this comment at |
The build is failing:
However, this seems unrelated to my PR. Please advise. |
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.
packages/eslint-plugin/tests/rules/no-unused-private-class-members.test.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/no-unused-private-class-members.ts
Outdated
Show resolved
Hide resolved
// } | ||
// ``` | ||
PrivateIdentifier(node): void { | ||
processPrivateIdentifier(node); |
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.
Threading #10265 (comment): I don't get that error locally. But I do get what Nx is getting (https://cloud.nx.app/runs/lsSb3ZQa0g?utm_source=pull-request&utm_medium=comment):
src/rules/no-unused-private-class-members.ts(215,34): error TS2345: Argument of type 'PrivateIdentifier' is not assignable to parameter of type 'Identifier'.
Type 'PrivateIdentifier' is missing the following properties from type 'Identifier': decorators, optional, typeAnnotation
Maybe a caching issue? I'd suggest merging from main
and re-building. 🤷
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 merged with main and now I am getting this Netlify error: https://app.netlify.com/sites/typescript-eslint/deploys/67295a26e190f200080d6053
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.
Furthermore, it looks like "docs.test.ts" has a lint error, but that is unrelated to my 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.
#10288 ✨
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 merged with main, but CI is now getting this error:
- 429: Unable to connect to Nx Cloud.
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.
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.
If you are implying that I am committing too much, I thought it was best-practice to put each PR fix that was brought up in a PR review thread by other people into a separate commit, which I did.
Anyways, I just merged from main again. Now, I get these two CI errors:
- https://cloud.nx.app/runs/WZCMfyPxRY/task/typescript-eslint%3Atest
- https://cloud.nx.app/runs/KCqe66ahXv/task/eslint-plugin%3Atest
I am not sure what they mean though.
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.
best-practice to put each PR fix that was brought up in a PR review thread by other people into a separate commit
I don't subscribe to that best practice 😄. It can be nice to have granular commits when there are tricky things being discussed. But there's no real utility most of the time.
The downside is that a lot of CI churn gets added to the repo. Which is never good: almost all repos are either on a rate-limited free plan (like we are) or a pay-for-bandwidth plan ($$$).
Now, I get these two CI errors:
You've got some test failures, have you tried reading through the test files mentioned in them? I haven't looked deeply but if you've got specific questions I can.
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.
You've got some test failures
Right, but the part I am confused about is that the test failures are in files that I haven't modified / not part of this PR. Do I have to add the new rule to one of the existing configs or something?
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.
That's what I'm trying to hint at with my questions: did you read the tests that are failing? The test names, the test failures, the code they touch?
Ideally, the repo's docs and tests should be set up so that you can debug through these and figure this out on your own. If it's not clear from them then that would be something we'd want to work on.
I'm not intentionally trying to be obtuse or unhelpful. But these are things that I think as someone who's got a bunch of PRs merged into this repo (❤️) you're equipped to debug.
packages/eslint-plugin/tests/rules/no-unused-private-class-members.test.ts
Outdated
Show resolved
Hide resolved
👋 Hey @Zamiell! Just checking in, is this still something you have time for? No worries if not - I just don't want to leave it hanging. |
👋 ping @Zamiell - this rule would be great, and I'm free to answer specific questions if you have any? |
yeah i still plan to work on this when i get some more free time, i have been very sick lately |
❤️ hope you feel better! Removing |
Closing out to un-block the issue, as planned. Cheers! |
PR Checklist
Overview
processPrivateIdentifier
such that it could be called from different kinds of nodes.PropertyDefinition
selector.