-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Allow prettier-eslint-cli to write eslint errors/warnings to stderr? #453
Comments
Are you talking about prettier/prettier-eslint#827? |
Yes, that's correct. My entire motivation for making that pull request to prettier-eslint was to be able to file this proposal/issue here. I will be happy to supply a PR for prettier-eslint-cli, if the idea raised in this issue is agreeable to you. |
Cool! That's definitely a great feature to me. About the option name I think maybe Another question, does ESLint print warning into stdout or stderror? I suppose it should be stdout, but stderror when |
I like As far as where the errors/warnings go, since the default behavior of prettier-eslint is to write the formatted version to stdout, it seems to me this information has to (all) go to stderr. It's also convenient because my editor is expecting nothing on stderr and if there is anything, it shows it in a popup. But if you have another convention in mind for what should go to stdout/stderr under what conditions, just let me know. When these design points are settled I will be happy to supply a PR as soon as I am able. |
I believe For stdout vs stderror, like I mentioned, I hope we keep same as ESLint itself. |
OK, I will try to figure out how to accept both On the other hand, on stdout vs. stderror, I remain confused about "being the same as ESLint itself." The default behavior of prettier-eslint-cli is analogous to On the other hand, Let me know on this point and I will get to work on a PR implementing the feature. |
Hah, I didn't considered that a file named
I mean, what does |
OK, if the word after
OK, that's fine, that would mean that |
Yes, and
I want to be compliant with ESLint's output, I don't have strong opinion on whether to use |
Which policy: A) When --write is not specified but --report-issues is, the fixed code goes to stdout and the warnings/errors go to stderr, OR B) When --write is not specified but --report-issues is, the fixed code and warnings/errors are mixed together on stdout? (I have understood that when both --write and --report-issues are specified, you would like the warnings/errors to go to stdout analogous to |
I don't quite follow, isn't What means I want when |
No,
But as mentioned above,
Please let me know if this scheme meets with your approval for a PR, or suggest concrete different behavior that you would like to see implemented. Thanks! |
@gwhitney Thanks for your patience and great writing up, I really appreciate. And I think you've convinced me. Let's print warnings/errors into stderr! |
Great. With the holidays not sure exactly when I will be able to finish the PR, but I will try to get it done by mid-next month if not before. |
No worry, there is no deadline for this optional feature. |
prettier-eslint-cli
version: 8.0.1prettier
version: 2.7.1eslint
version: 8.19.0Prior to
prettier-eslint
v. 16.2.0, it discarded all errors/warnings from eslint. Now there is an alternate entry to prettier-eslint that captures that information. I runprettier-eslint-cli
automatically on save from my editor, so it would be convenient for any such warnings/errors to be written to stderr. That way, any errors would pop up in the editor when I save, which would prevent me from having a surprise that there are eslint violations when I go to try to make a commit.Could an option be added to
prettier-eslint-cli
that will cause eslint errors/warnings to be written to stderr? Perhaps--report-errors
?The text was updated successfully, but these errors were encountered: