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): check for relative/root paths in printing file path errors #6491

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Completely eschews process.cwd() detection (which already wasn't relevant anyway, as tsconfigRootDir defaults to process.cwd()!) in favor of checking whether the tsconfigRootDir against the printed filePath.

This means that the nice `<tsconfigRootDir>/` prefix now only shows up when the tsconfigRootDir is a complete starter for the path. Siblings and distance parents will no longer show up.

@nx-cloud
Copy link

nx-cloud bot commented Feb 19, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit cc71649. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 46 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

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.

@netlify
Copy link

netlify bot commented Feb 19, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit cc71649
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/63f51f5fcd65e200084f0773
😎 Deploy Preview https://deploy-preview-6491--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review February 19, 2023 03:40
@codecov
Copy link

codecov bot commented Feb 19, 2023

Codecov Report

Merging #6491 (cc71649) into main (16144d1) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6491      +/-   ##
==========================================
- Coverage   90.66%   90.66%   -0.01%     
==========================================
  Files         374      376       +2     
  Lines       12823    12851      +28     
  Branches     3777     3783       +6     
==========================================
+ Hits        11626    11651      +25     
- Misses        853      856       +3     
  Partials      344      344              
Flag Coverage Δ
unittest 90.66% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...-estree/src/create-program/createProjectProgram.ts 97.67% <100.00%> (+4.19%) ⬆️
...ript-estree/src/create-program/describeFilePath.ts 100.00% <100.00%> (ø)
...lugin/src/rules/consistent-generic-constructors.ts 90.69% <0.00%> (-4.18%) ⬇️
packages/type-utils/src/containsAllTypesByName.ts 0.00% <0.00%> (ø)
.../eslint-plugin/src/rules/promise-function-async.ts 98.07% <0.00%> (ø)
packages/typescript-estree/src/clear-caches.ts 100.00% <0.00%> (ø)
...pt-estree/src/parseSettings/createParseSettings.ts 91.66% <0.00%> (+0.36%) ⬆️
...ipt-estree/src/parseSettings/resolveProjectList.ts 91.48% <0.00%> (+0.37%) ⬆️

…gram.ts

Co-authored-by: Armano <armano2@users.noreply.github.com>
armano2
armano2 previously approved these changes Feb 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg merged commit dc14242 into typescript-eslint:main Feb 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg deleted the fuller-describe-file-path branch February 27, 2023 21:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2023
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: Excess <tsconfigRootDir>/../../... before parserOptions.project complaints
2 participants