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(typescript-estree): infers singleRun as true for project service#11327
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
Thanks for the PR,@nayounsang! 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 commentedJun 21, 2025 • 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 project configuration. |
nx-cloudbot commentedJun 21, 2025 • 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.
View yourCI Pipeline Execution ↗ for commitb483190
☁️Nx Cloud last updated this comment at |
nayounsang commentedJun 21, 2025
Why tests was failed inCI? |
nayounsang commentedJun 23, 2025 • 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.
Can't reproduce test errors in local development. |
Uh oh!
There was an error while loading.Please reload this page.
fcdcb41 tode26768CompareJamesHenry commentedJul 15, 2025
@JoshuaKGoldberg@nayounsang Ok this one drove me a little insane working my way to a reproduction, but it actually has nothing to do with caching, it is all to do with whether In other words, you should be able to repro with: CI=true TYPESCRIPT_ESLINT_PROJECT_SERVICE=true nxtest typescript-estree --skip-nx-cache |
nayounsang commentedJul 16, 2025
Thanks for helping us find the cause of this weird bug. Now let's fix our logic to fix the CI test failure. |
codecovbot commentedJul 18, 2025 • 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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #11327 +/- ##==========================================- Coverage 90.86% 90.66% -0.20%========================================== Files 503 518 +15 Lines 51028 52435 +1407 Branches 8418 8686 +268 ==========================================+ Hits 46366 47541 +1175- Misses 4648 4880 +232 Partials 14 14
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
nayounsang commentedJul 19, 2025 • 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.
Hi@JoshuaKGoldberg . Thank you for always helping me. I would like to ask you a question. (I can see the processing |
nayounsang commentedJul 21, 2025 • 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.
When constresultProgram=parseAndGenerateServices(code,options).services.program;expect(resultProgram).toStrictEqual(mockProgram); Because, the code is to solve the bug that occurs when programInstance is not found in the singleRun environment. |
| it('should create program when extraFileExtensions is provided in projectService and singleRun mode',()=>{ | ||
| vi.stubEnv('TSESTREE_SINGLE_RUN','true'); | ||
| constresultProgram=parseAndGenerateServices(code,{ |
nayounsangJul 21, 2025 • 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.
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.
As asked, I'm not sure if testing like this is desirable.parseAndGenerateService -> getProgramAndAST (in singleRun, get AST and program) -> useProgramFromProjectService -> extraFileExtensions
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'd remove this test change.
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 committed
JoshuaKGoldberg left a comment
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.
The first&& added seems off to me, but the other looks good. Am I reading it right?
Uh oh!
There was an error while loading.Please reload this page.
| it('should create program when extraFileExtensions is provided in projectService and singleRun mode',()=>{ | ||
| vi.stubEnv('TSESTREE_SINGLE_RUN','true'); | ||
| constresultProgram=parseAndGenerateServices(code,{ |
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'd remove this test change.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
JoshuaKGoldberg left a comment
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.
Ok I think we're pretty much there - just the one logical change. 🚀
Uh oh!
There was an error while loading.Please reload this page.
JoshuaKGoldberg left a comment• 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.
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.
✨ great, thanks!
Since I was so involved with this, someone else from @typescript-eslint/triage-team should probably take a look too.
75cc7d2 intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.

PR Checklist
Overview
As
projectis null whenprojectServiceis true, we have to fix validate logic