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): skip isTTY version check if user passes loggerFn on unsupported TypeScript version warning #7739

Merged

Conversation

hyperupcall
Copy link
Contributor

@hyperupcall hyperupcall commented Oct 11, 2023

PR Checklist

Overview

From the linked PR, this disabled the isTTY heuristic if loggerFn was supplied as an option:

  • If loggerFn is a function, then the heuristic is now bypassed completely
  • If loggerFn is false, then the heuristic logic runs, but the result is effectively a no-op (nothing is printed in this case)

Additionally, this fixes warn-on-unsupported-ts.test.ts by properly requiring/importing parser.ts for every test. Previously, it would only import once at the start, which prevented the top-level assignment let warnedAboutTSVersion = false (and later assignments/side-effects thereof) from being reset (in warnAboutTSVersion.ts).

It seems TypeScript complains about the await import; the error seems ignored in other places so I ignored it too.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @hyperupcall!

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 Oct 11, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit cada6e1
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/65469bbedf4d2e0008c03844
😎 Deploy Preview https://deploy-preview-7739--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: 96 (🔴 down 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (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.

@hyperupcall hyperupcall changed the title fix(typescript-estree): skip isTTY version check if user passes loggerFn on unsupported TypeScript warning fix(typescript-estree): skip isTTY version check if user passes loggerFn on unsupported TypeScript version warning Oct 11, 2023
@hyperupcall hyperupcall marked this pull request as ready for review October 11, 2023 08:38
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

💯 great, thanks! Nice to see this 3+ year old issue resolved.

Just a few nitpicks from my end. Because they're not blocking at all I can just touch them up before merging.

Cartoon pickle smiling and lifting a top hat up and down. Caption: 'Thanks!'

@hyperupcall
Copy link
Contributor Author

hyperupcall commented Oct 19, 2023

Just a few nitpicks from my end. Because they're not blocking at all I can just touch them up before merging.

Sounds good! I'm not sure if my branch is comitable from your end, so feel free to point out the nits, and I'll be able to make the changes if you are not able to.

@JoshuaKGoldberg
Copy link
Member

Ah you're right! It's not. If you could make them or grant me access, that'd be great thanks 😄. Otherwise no worries.

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready label Oct 19, 2023
@hyperupcall
Copy link
Contributor Author

hyperupcall commented Oct 23, 2023

If you could make them or grant me access

I wish I had the ability to, but the "maintainers of a repository can edit branches from forks from that repository" feature only works if the fork is owned by a personal account. And this fork is owned by fox-forks, an organization account, not hyperupcall. I even contacted support about it, I'm hoping they add support for that.

@bradzacher bradzacher changed the title fix(typescript-estree): skip isTTY version check if user passes loggerFn on unsupported TypeScript version warning feat(typescript-estree): skip isTTY version check if user passes loggerFn on unsupported TypeScript version warning Nov 11, 2023
@bradzacher bradzacher merged commit 9656e13 into typescript-eslint:main Nov 11, 2023
46 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready
Projects
None yet
3 participants