Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

Zamiell
Copy link
Contributor

@ZamiellZamiell commentedNov 2, 2024
edited
Loading

PR Checklist

Overview

  • First I copied the base rule from ESLint.
  • Next, I converted it to TypeScript + made it pass the linter + ensured that all tests were still passing.
  • Then, I refactored the main logic into a separate function calledprocessPrivateIdentifier such that it could be called from different kinds of nodes.
  • Then, I added thePropertyDefinition selector.
  • Finally, I added some basic tests. Since the logic is directly reused from the base rule, more Typescript-specific tests are probably superfluous.

zanminkian reacted with thumbs up emojiluketanner reacted with hooray emojiluketanner reacted with heart emoji
@typescript-eslint
Copy link
Contributor

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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedNov 2, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit684c009
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/672f4dfb4818a300081261e5
😎 Deploy Previewhttps://deploy-preview-10265--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 7 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedNov 2, 2024
edited
Loading

View yourCI Pipeline Execution ↗ for commit684c009.

CommandStatusDurationResult
nx run-many --target=build --exclude website --...✅ Succeeded54sView ↗
nx run-many --target=clean✅ Succeeded11sView ↗

☁️Nx Cloud last updated this comment at2024-12-31 21:07:13 UTC

@Zamiell
Copy link
ContributorAuthor

The build is failing:

james@1qaz MSYS /d/Repositories/typescript-eslint/packages/eslint-plugin (no-unused-private-class-members)$ npm run build> @typescript-eslint/eslint-plugin@8.12.2 build> tsc -b tsconfig.build.json../typescript-estree/src/convert.ts:2253:11 - error TS2367: This comparison appears to be unintentional because the types 'SyntaxKind.Identifier' and 'SyntaxKind.StringLiteral' have no overlap.2253           local.kind === SyntaxKind.StringLiteral &&               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Found 1 error.npm error Lifecycle script `build` failed with error:npm error code 2npm error path D:\Repositories\typescript-eslint\packages\eslint-pluginnpm error workspace @typescript-eslint/eslint-plugin@8.12.2npm error location D:\Repositories\typescript-eslint\packages\eslint-pluginnpm error command failednpm error command C:\Windows\system32\cmd.exe /d /s /c tsc -b tsconfig.build.json

However, this seems unrelated to my PR. Please advise.

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

A good start!

Tank from The Matrix excitedly saying "it's a very exciting time"

// }
// ```
PrivateIdentifier(node): void {
processPrivateIdentifier(node);

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 frommain and re-building. 🤷

Copy link
ContributorAuthor

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

Copy link
ContributorAuthor

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.

Choose a reason for hiding this comment

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

#10288

Copy link
ContributorAuthor

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.

JoshuaKGoldberg reacted with laugh emoji

Choose a reason for hiding this comment

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

429 Too Many Requests

Screenshot of nine commits fro Zamiell, either named 'update' or a merge from main

It'll probably ease up on you if you push less.

Copy link
ContributorAuthor

@ZamiellZamiellNov 9, 2024
edited
Loading

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:

I am not sure what they mean though.

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.

Copy link
ContributorAuthor

@ZamiellZamiellNov 9, 2024
edited
Loading

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?

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.

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 4, 2024
@JoshuaKGoldberg
Copy link
Member

👋 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.

luketanner reacted with thumbs up emoji

@JoshuaKGoldberg
Copy link
Member

👋 ping@Zamiell - this rule would be great, and I'm free to answer specific questions if you have any?

@JoshuaKGoldbergJoshuaKGoldberg added the stalePRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period labelDec 31, 2024
@Zamiell
Copy link
ContributorAuthor

yeah i still plan to work on this when i get some more free time, i have been very sick lately

@JoshuaKGoldberg
Copy link
Member

❤️ hope you feel better!

Removingstale and setting as a draft for now. If this is still pending in February I'd say we should close it out to un-block the issue.

ronami reacted with thumbs up emoji

@JoshuaKGoldbergJoshuaKGoldberg removed the stalePRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period labelJan 10, 2025
@JoshuaKGoldberg
Copy link
Member

Closing out to un-block the issue, as planned. Cheers!

@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 10, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg requested changes

Assignees
No one assigned
Labels
awaiting responseIssues waiting for a reply from the OP or another party
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Rule proposal: no-unused-private-class-members
2 participants
@Zamiell@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp