-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
ability to capture (non-fixable) eslint errors/warnings? #704
Comments
PR welcome |
Stale issue |
Oh, sorry I let this get stale. Working on a PR now. As far as I can see, the interface of |
Adds another export `analyze` from this package, which behaves exactly like `format` except that it returns a simple object with properties `output` giving the formatted text and `messages` giving the eslint messages produced in processing the input text. Clients can call `analyze` instead of `format` if they wish, for example, to capture any errors that esling may have encountered. Resolves prettier#704.
Confused why this is closed before #827 is merged? |
With #827 closed (what else can I do to help fix this?), could this issue be re-opened? It has not been resolved, and it was judged "PR welcome" initially. My apologies for the long period between that invitation and the PR I submitted, but please let me know if there is anything I can do to move toward a solution for this issue. Thanks! |
Adds another export `analyze` from this package, which behaves exactly like `format` except that it returns a simple object with properties `output` giving the formatted text and `messages` giving the eslint messages produced in processing the input text. Clients can call `analyze` instead of `format` if they wish, for example, to capture any errors that esling may have encountered. Resolves prettier#704.
Versions:
prettier-eslint
version: 13.0.0node
version: 16.13.12npm
(oryarn
) version: npm 8.1.2Problem description:
Currently,
prettier-eslint
explicitly discards errors/warnings about eslint rule violations, as it is focused just on amending code to be compliant where it can. But I useprettier-eslint-cli
to runprettier-eslint
automatically on save from my editor. In that use case, it would be convenient for such errors/warnings to be written to stderr -- if that happened, they would pop up in my editor when I saved a file, which would save a step of running eslint at the end to check for any unfixable problems.Suggested solution:
Add an option to
prettier-eslint
to pass back eslint error/warning messages about rule violations, in addition to the amended code, so thatprettier-eslint-cli
could then (perhaps optionally) write those to stderr. (Note I have yet to file an issue about this on theprettier-eslint-cli
repo because at the moment there's no way the information could be written to stderr, sinceprettier-eslint
is not providing it.)Thanks for considering.
The text was updated successfully, but these errors were encountered: