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

feat(typescript-estree): clarify docs and error for program project without matching TSConfig #5762

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 7, 2022

PR Checklist

Overview

This PR does three things:

  • It changes the error message from @typescript-eslint/typescript-estree -as called by @typescript-eslint/parser when parserOptions.program is specified but no TSConfig includes the file being linted. Now, the error message is much more clear on what's going on, and what some suggested remediations & further docs reading are
  • It clarifies & expands the initial context mentioned in the docs
  • It moves those docs from Typed Linting FAQs to the general troubleshooting page
    • I'm not 100% on this, and might be changing my opinion from several months ago... but my current hunch is that it'd be good to have all FAQs in one place

@nx-cloud
Copy link

nx-cloud bot commented Oct 7, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 73e875f. 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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Oct 7, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 73e875f
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/635703b0652449000800d91f
😎 Deploy Preview https://deploy-preview-5762--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.

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #5762 (def07d6) into main (1eaae09) will decrease coverage by 0.00%.
The diff coverage is 90.90%.

❗ Current head def07d6 differs from pull request most recent head 73e875f. Consider uploading reports for the commit 73e875f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5762      +/-   ##
==========================================
- Coverage   91.33%   91.32%   -0.01%     
==========================================
  Files         361      361              
  Lines       12033    12041       +8     
  Branches     3503     3506       +3     
==========================================
+ Hits        10990    10997       +7     
- Misses        747      748       +1     
  Partials      296      296              
Flag Coverage Δ
unittest 91.32% <90.90%> (-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 93.47% <90.90%> (-0.81%) ⬇️
...ackages/eslint-plugin/src/rules/member-ordering.ts 95.62% <0.00%> (-0.10%) ⬇️

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review October 7, 2022 02:26
Copy link
Contributor

@a-churchill a-churchill left a comment

Choose a reason for hiding this comment

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

As an end user I think the updated error message + associated docs are very helpful!

docs/linting/TROUBLESHOOTING.md Outdated Show resolved Hide resolved
Co-authored-by: Andrew Churchill <chu.andrew.8@gmail.com>
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.

not a full review, just a few comments

docs/linting/TROUBLESHOOTING.md Show resolved Hide resolved
docs/linting/TROUBLESHOOTING.md Outdated Show resolved Hide resolved
docs/linting/TROUBLESHOOTING.md Show resolved Hide resolved
docs/linting/TROUBLESHOOTING.md Outdated Show resolved Hide resolved
docs/linting/TROUBLESHOOTING.md Outdated Show resolved Hide resolved
docs/linting/TROUBLESHOOTING.md Outdated Show resolved Hide resolved
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.

summore comments! Looking good!

@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party enhancement New feature or request labels Oct 24, 2022
JoshuaKGoldberg and others added 2 commits October 24, 2022 13:58
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Oct 24, 2022
## I get errors telling me "The file must be included in at least one of the projects provided"
## I get errors telling me "ESLint was configured to run ... However, that TSConfig does not / none of those TSConfigs include this file"

### Fixing the Error
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 split this section into these two h3s. Re-reading the un-split explanation felt like a tl;dr. My instinct is users just want to know how to fix this ASAP.

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.

image

@JoshuaKGoldberg JoshuaKGoldberg enabled auto-merge (squash) October 24, 2022 21:29
@JoshuaKGoldberg JoshuaKGoldberg merged commit 67744db into typescript-eslint:main Oct 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Docs: Improve error message & docs for "The file does not match your project config"
3 participants