Skip to content

fix(typescript-estree): don't add in-project files to defaultProjectMatchedFiles #9097

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

Conversation

ehoogeveen-medweb
Copy link

PR Checklist

Overview

Only add path to defaultProjectMatchedFiles if opened.configFileName is falsy.

The fix itself is pretty trivial and existing tests still pass, but I might need some help with adding a new testcase. I tried adapting the existing testcase at

it('throws an error when called more than the maximum allowed file count', () => {
but only succeeded in making other tests fail (maybe I mocked a result and then didn't call the function, I'm not sure).

…atchedFiles

Only add path to defaultProjectMatchedFiles if opened.configFileName is falsy.
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @ehoogeveen-medweb!

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.

Copy link

netlify bot commented May 14, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 449d30e
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6644ff1abaf89a0007ab42e0
😎 Deploy Preview https://deploy-preview-9097--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 1 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 your Netlify site configuration.

@ehoogeveen-medweb
Copy link
Author

Linting is clean locally. From the log, it looks like website-eslint:lint failed with an AtomicsWaitError, so I doubt it's me 😄

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Source code change looks nice and clean! 🙌

Ensure it does not throw for in-project files
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Dwight from The Office jumping up and fisting up in the air triumphantly

@JoshuaKGoldberg JoshuaKGoldberg merged commit a124d4f into typescript-eslint:main May 15, 2024
59 checks passed
@karlhorky
Copy link

karlhorky commented May 17, 2024

@ehoogeveen-medweb @JoshuaKGoldberg Thanks for the PR, review and merge 🙌

I'm trying out the v8 alpha releases, and I didn't see this change in dist/useProgramFromProjectService.js in the latest v8 alpha (although the latest v7 alpha does contain the change):

Would it be possible to get a v8 alpha version published with this change?

I tried opening a PR to merge main into v8 (similar to 0d85360), but it gave me an error:

Pull request creation failed. Validation failed: must be a collaborator

@JoshuaKGoldberg
Copy link
Member

We merged the main branch into v8 and now 8.0.0-alpha.14 should include everything. 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: "Too many files (>8) have matched the default project" error triggers on every file after 8
3 participants