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
feat(typescript-estree): skip isTTY
version check if user passes loggerFn
on unsupported TypeScript version warning
#7739
Conversation
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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
isTTY
version check if user passes loggerFn
on unsupported TypeScript warningisTTY
version check if user passes loggerFn
on unsupported TypeScript version warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts
Outdated
Show resolved
Hide resolved
packages/typescript-estree/tests/lib/warn-on-unsupported-ts.test.ts
Outdated
Show resolved
Hide resolved
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. |
Ah you're right! It's not. If you could make them or grant me access, that'd be great thanks 😄. Otherwise no worries. |
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. |
isTTY
version check if user passes loggerFn
on unsupported TypeScript version warningisTTY
version check if user passes loggerFn
on unsupported TypeScript version warning
PR Checklist
isTTY
check for printing the "SUPPORTED TYPESCRIPT VERSIONS" message if the user passes in theloggerFn
option #3506Overview
From the linked PR, this disabled the
isTTY
heuristic ifloggerFn
was supplied as an option:loggerFn
is a function, then the heuristic is now bypassed completelyloggerFn
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/importingparser.ts
for every test. Previously, it would only import once at the start, which prevented the top-level assignmentlet warnedAboutTSVersion = false
(and later assignments/side-effects thereof) from being reset (inwarnAboutTSVersion.ts
).It seems TypeScript complains about the
await import
; the error seems ignored in other places so I ignored it too.