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 TTY before version mismatch warning #1121

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

FabioAntunes
Copy link
Contributor

Currently the Warning regarding the versions mismatch breaks other tools, like ALE for vim.
Since some tools depend on the output to the stdout to be a well formatted json.

This fixes the issue by allowing tools to use the parser without getting the warning, but still displaying the warning if the user triggers the command from the terminal.

Fixes #1060

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @FabioAntunes!

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.

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.

@codecov
Copy link

codecov bot commented Oct 21, 2019

Codecov Report

Merging #1121 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1121      +/-   ##
==========================================
+ Coverage   94.07%   94.07%   +<.01%     
==========================================
  Files         120      120              
  Lines        5212     5213       +1     
  Branches     1442     1443       +1     
==========================================
+ Hits         4903     4904       +1     
  Misses        177      177              
  Partials      132      132
Impacted Files Coverage Δ
packages/typescript-estree/src/parser.ts 95.61% <100%> (+0.03%) ⬆️

@FabioAntunes
Copy link
Contributor Author

Hey @bradzacher, that's what I did on this PR

@bradzacher
Copy link
Member

Oh my. Sorry, I completely misread the file path.
I thought for a second the logic was in both parser and typescript-estree.

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.

LGTM - thanks for this

@bradzacher bradzacher changed the title fix(parser): adds TTY check before logging the version mismatch warning fix(parser): check TTY before logging the version mismatch warning Oct 22, 2019
@bradzacher bradzacher changed the title fix(parser): check TTY before logging the version mismatch warning fix(typescript-estree): check TTY before version mismatch warning Oct 22, 2019
@bradzacher bradzacher merged commit 768ef63 into typescript-eslint:master Oct 22, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
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.

Version check warning breaks parsing output of eslint --format=json
2 participants