-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): allow providing more one than one existing program in config #3508
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
Thanks for the PR, @JamesHenry! 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. |
Codecov Report
@@ Coverage Diff @@
## master #3508 +/- ##
=======================================
Coverage 92.63% 92.63%
=======================================
Files 325 325
Lines 11227 11230 +3
Branches 3164 3165 +1
=======================================
+ Hits 10400 10403 +3
Misses 367 367
Partials 460 460
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Nx Cloud ReportCI ran the following commands for commit ead704e. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
Changed to draft while investigating a discrepancy between the lint results behaviour when providing multiple programs ahead of time vs letting typescript-eslint create watch programs |
Resolved as per slack discussion, changing back to ready for review |
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.
LGTM
@@ -1,6 +1,8 @@ | |||
{ | |||
"compilerOptions": { | |||
"types": ["@types/node"] | |||
"types": ["@types/node"], | |||
"noEmit": true, |
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.
you shouldn't need this as we add it automatically:
typescript-eslint/packages/typescript-estree/src/create-program/useProvidedProgram.ts
Line 58 in ced9b26
CORE_COMPILER_OPTIONS, |
const CORE_COMPILER_OPTIONS: ts.CompilerOptions = { | |
noEmit: true, // required to avoid parse from causing emit to occur | |
/** | |
* Flags required to make no-unused-vars work | |
*/ | |
noUnusedLocals: true, | |
noUnusedParameters: true, | |
}; |
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 but those are not invoked when we provide our own programs up front with the utility from parser, so I thought it made sense to keep the tsconfig.eslint.json
in a state where it is independently working
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.
Oh sorry, you are just focusing on noEmit - you are right there!
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 was thinking of allowJs
The
program
(singular) option was only merged yesterday and had not yet been released (other than auto canaries).