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): add default value for parserOptions.projectFolderIgnoreList and deduplicate resolved projects #2819

Merged
merged 1 commit into from Nov 26, 2020

Conversation

bradzacher
Copy link
Member

In #2418 I introduced a regression - I forgot to add in the default value for projectFolderIgnoreList.
This means that globs have been matching node_modules since the v4.0 release! Oops :(

This PR fixes that.
It also hoists the tsconfig path canonicalisation up so that we can deduplicate early.
Previously if you provided a config like projects: ['./tsconfig.json', './**/tsconfig.json'], then we would resolve this to ./tsconfig.json and tsconfig.json, then later canonicalise them.
This meant we'd check that same tsconfig twice!
By hoisting the canonicalisation, we can deduplicate this early.

Fixes #2814

…olderIgnoreList` and deduplicate resolved projects

In #2418 I introduced a regression - I forgot to add in the default value for `projectFolderIgnoreList`.
This means that globs have been matching `node_modules` since the v4.0 release! Oops :(

This PR fixes that.
It also hoists the tsconfig path canonicalisation up so that we can deduplicate early.
Previously if you provided a config like `projects: ['./tsconfig.json', './**/tsconfig.json']`, then we would resolve this to `./tsconfig.json` and `tsconfig.json`, then later canonicalise them.
This meant we'd check that same tsconfig twice!
By hoisting the canonicalisation, we can deduplicate this early.

Fixes #2814
@bradzacher bradzacher added the bug Something isn't working label Nov 26, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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 Nov 26, 2020

Codecov Report

Merging #2819 (04118dc) into master (14758d2) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2819      +/-   ##
==========================================
- Coverage   92.74%   92.74%   -0.01%     
==========================================
  Files         309      309              
  Lines       10320    10317       -3     
  Branches     2920     2920              
==========================================
- Hits         9571     9568       -3     
  Misses        346      346              
  Partials      403      403              
Flag Coverage Δ
unittest 92.74% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ges/typescript-estree/src/create-program/shared.ts 87.87% <ø> (-0.70%) ⬇️
...-estree/src/create-program/createDefaultProgram.ts 76.19% <100.00%> (ø)
...pt-estree/src/create-program/createWatchProgram.ts 77.04% <100.00%> (-0.12%) ⬇️

@bradzacher bradzacher merged commit bf904ec into master Nov 26, 2020
@bradzacher bradzacher deleted the default-projectFolderIgnoreList branch November 26, 2020 21:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parser is looking in the wrong place for the tsconfig file
1 participant