-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(typescript-estree): clarify docs and error for program project without matching TSConfig #5762
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(typescript-estree): clarify docs and error for program project without matching TSConfig #5762
Conversation
…ithout matching TSConfig
Thanks for the PR, @JoshuaKGoldberg! 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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5762 +/- ##
==========================================
- Coverage 91.33% 91.32% -0.01%
==========================================
Files 361 361
Lines 12033 12041 +8
Branches 3503 3506 +3
==========================================
+ Hits 10990 10997 +7
- Misses 747 748 +1
Partials 296 296
Flags with carried forward coverage won't be shown. Click here to find out 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.
As an end user I think the updated error message + associated docs are very helpful!
Co-authored-by: Andrew Churchill <chu.andrew.8@gmail.com>
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.
not a full review, just a few comments
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
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.
summore comments! Looking good!
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/src/create-program/createProjectProgram.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
## I get errors telling me "The file must be included in at least one of the projects provided" | ||
## I get errors telling me "ESLint was configured to run ... However, that TSConfig does not / none of those TSConfigs include this file" | ||
|
||
### Fixing the Error |
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 split this section into these two h3s. Re-reading the un-split explanation felt like a tl;dr. My instinct is users just want to know how to fix this ASAP.
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.
PR Checklist
Overview
This PR does three things:
@typescript-eslint/typescript-estree
-as called by@typescript-eslint/parser
whenparserOptions.program
is specified but no TSConfig includes the file being linted. Now, the error message is much more clear on what's going on, and what some suggested remediations & further docs reading are