Skip to content
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

fix(typescript-estree): allow providing more one than one existing program in config #3508

Merged
merged 3 commits into from Jun 9, 2021

Conversation

JamesHenry
Copy link
Member

The program (singular) option was only merged yesterday and had not yet been released (other than auto canaries).

@typescript-eslint
Copy link
Contributor

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
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #3508 (ead704e) into master (ced9b26) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           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           
Flag Coverage Δ
unittest 92.63% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ils/src/ast-utils/eslint-utils/ReferenceTracker.ts 100.00% <ø> (ø)
...es/experimental-utils/src/ts-eslint-scope/index.ts 100.00% <ø> (ø)
...t-estree/src/create-program/useProvidedPrograms.ts 84.84% <100.00%> (ø)

@nx-cloud
Copy link

nx-cloud bot commented Jun 9, 2021

Nx Cloud Report

CI 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

Status Command
#000000 nx run-many --target=build --all --parallel
#000000 nx run-many --target=typecheck --all --parallel

Sent with 💌 from NxCloud.

@JamesHenry JamesHenry marked this pull request as draft June 9, 2021 13:03
@JamesHenry
Copy link
Member Author

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

@JamesHenry
Copy link
Member Author

Resolved as per slack discussion, changing back to ready for review

@JamesHenry JamesHenry marked this pull request as ready for review June 9, 2021 15:30
@bradzacher bradzacher added the enhancement New feature or request label Jun 9, 2021
Copy link
Member

@bradzacher bradzacher left a 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,
Copy link
Member

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:

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,
};

Copy link
Member Author

@JamesHenry JamesHenry Jun 9, 2021

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

Copy link
Member Author

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!

Copy link
Member Author

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

@JamesHenry JamesHenry merged commit 4f1806e into master Jun 9, 2021
@JamesHenry JamesHenry deleted the programs branch June 9, 2021 19:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants