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): specific error for parserOptions.project not including a file #9584

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Jul 18, 2024

PR Checklist

Overview

When parseSettings.projects is populated, useProvidedPrograms nows refer to parserOptions.project and project(s) instead of parserOptions.programs and program(s).

Also applies a mild refactor to reduce nesting in the function.

I think after this I'd like to holistically revamp the error messages around invalid

💖

@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.

Copy link

netlify bot commented Jul 18, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit c201b6c
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/669910a32b9d5a00088032eb
😎 Deploy Preview https://deploy-preview-9584--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 5 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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

}

astAndProgram.program.getTypeChecker(); // ensure parent pointers are set in source files
const relativeFilePath = path.relative(
parseSettings.tsconfigRootDir,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be tsconfigRootDir || process.cwd(), but I'm pretty sure that's unnecessary. createParseSettings already defaults tsconfigRootDir to process.cwd().

Copy link

nx-cloud bot commented Jul 18, 2024

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review July 18, 2024 11:51
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team July 18, 2024 11:51
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft July 18, 2024 11:52
@JoshuaKGoldberg JoshuaKGoldberg removed the request for review from a team July 18, 2024 11:52
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the project-programs-not-found-error branch from 0ac9fb4 to b58de4b Compare July 18, 2024 11:53
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.92%. Comparing base (c365664) to head (c201b6c).
Report is 6 commits behind head on v8.

Additional details and impacted files
@@           Coverage Diff           @@
##               v8    #9584   +/-   ##
=======================================
  Coverage   87.91%   87.92%           
=======================================
  Files         397      397           
  Lines       13556    13556           
  Branches     3936     3936           
=======================================
+ Hits        11918    11919    +1     
  Misses       1325     1325           
+ Partials      313      312    -1     
Flag Coverage Δ
unittest 87.92% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
...t-estree/src/create-program/useProvidedPrograms.ts 87.87% <100.00%> (+3.03%) ⬆️

@@ -9,7 +9,7 @@ export function useClipboard(code: () => string): useClipboardResult {

const copy = useCallback(
() =>
void navigator.clipboard.writeText(code()).then(() => {
navigator.clipboard.writeText(code()).then(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also in the v8 branch. GitHub just isn't updating...

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review July 18, 2024 13:15
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team July 18, 2024 13:15
@JoshuaKGoldberg JoshuaKGoldberg added this to the 8.0.0 milestone Jul 18, 2024
@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jul 19, 2024
@JoshuaKGoldberg JoshuaKGoldberg merged commit 97cb1a3 into typescript-eslint:v8 Jul 21, 2024
66 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the project-programs-not-found-error branch July 21, 2024 13:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants