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

chore(eslint-plugin): switch auto-generated test cases to hand-written in prefer-nullish-coalescing.test.ts#11325

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

Open
Vinccool96 wants to merge1 commit intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromVinccool96:chore/11046-prefer-nullish-coalescing-handwritten

Conversation

Vinccool96
Copy link
Contributor

PR Checklist

Overview

  • Change dynamic test cases using spread and map to handwritten ones
  • Seven (7) existing recurring cases have been removed
  • No further recurring cases exist
  • It's now almost the same length as the repo's lockfile (19278 vs 20905 lines), it will need to be split up ASAP, but where?

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@Vinccool96!

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 commentedJun 20, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit9677a0c
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/6855b2a7717bf20008dd2535
😎 Deploy Previewhttps://deploy-preview-11325--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: 84 (🔴 down 14 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (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 project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJun 20, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commit9677a0c.

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded4m 54sView ↗
nx run-many -t typecheck✅ Succeeded1m 54sView ↗
nx run-many -t lint✅ Succeeded13sView ↗
nx run integration-tests:test✅ Succeeded<1sView ↗
nx run types:build✅ Succeeded1sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded<1sView ↗
nx test typescript-estree --coverage=false✅ Succeeded<1sView ↗
nx run generate-configs✅ Succeeded5sView ↗
Additional runs (27)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-06-20 19:23:39 UTC

@Vinccool96
Copy link
ContributorAuthor

image

JoshuaKGoldberg reacted with laugh emoji

@github-actionsGitHub Actions
Copy link

Uh oh!@Vinccool96, at least one image you shared is missing helpful alt text. Check#11325 (comment) to fix the following violations:

  • Images should have meaningful alternative text (alt text) at line 1

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text atBasic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically bygithub/accessibility-alt-text-bot.

@JoshuaKGoldberg
Copy link
Member

No further recurring cases exist
It's now almost the same length as the repo's lockfile (19278 vs 20905 lines), it will need to be split up ASAP, but where?

Those two statements are mutually exclusive 😄. Even if no cases are=== equal, having >19k lines means there are definitely overlaps. I skimmed through the code and can see:

  • Many many permutations of all the primitives in a union (string | boolean | undefined,string | number | undefined, ...)
  • Many many permutations of chaining logic (a ?? b,(a ?? b) || c,(a || b) || c, ...)
  • Many many permutations of property accesses (this.n,x.z, ...)
  • Combinations of all of the above across different depths of nested properties (2, 3, 4, ...)

I think a large percentage of the file -perhaps a majority- could be deduplicated without reducing logical coverage of the rule.

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment
edited
Loading

Choose a reason for hiding this comment

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

Thanks for getting this started! I don't think we can work with a ~19-20k file test though. This is the kind of explosive duplication the backing issue is trying to avoid. Can you reduce the number of redundant test cases please?

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelJun 23, 2025
@Vinccool96
Copy link
ContributorAuthor

Vinccool96 commentedJun 23, 2025
edited
Loading

Sure. But do you have a trick on how to spot redundant test cases, and how to know I'm not removing something useful?

@JoshuaKGoldberg
Copy link
Member

I've got no quick tricks to mention 😞. In general, each test case should try to test some unique piece of logic. So if you're looking at a test, try to ask:"what piece(s) of logic / potential breakage(s) is this checking?" If every answer is already comprehensively covered by earlier tests, then the later test can probably be removed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg requested changes

Requested changes must be addressed to merge this pull request.

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.

Repo: [prefer-nullish-coalescing.test.ts] Switch auto-generated test cases to hand-written
2 participants
@Vinccool96@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp