-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add --fix-to-stdout back #298
Conversation
The code quality is not there yet but I would appreciate early feedback if you have any. |
8ef7198
to
c9037f4
Compare
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.
Thanks for starting this! ❤️
I left some minor comments. Generally the idea seems fine. 👍
Error cases should probably always print to console.error
and write the input to stdout, so that the original text is preserved. Could be annoying otherwise. What do you think?
71d04ee
to
5e5dad7
Compare
I improved the code following your review and added a few tests. I need to write more tests and add support for older versions of eslint. Feel free to give me more feedback if you see anything I should pay attention to. My main problem is that integration tests are flaky now. For the same code, they sometimes pass and sometimes fail:
Given that the integration tests depend on each other (the suite uses |
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.
Nice! Regarding the integration test:
They depend on each other since the first ones start the server, then check for --version and status etc. which I think makes sense.
However, feel free to create a new group for the --fix-to-stdout
tests with a before
that starts the daemon and an after
that stops it. This way you can use only
on each of the new tests.
5e5dad7
to
4564909
Compare
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.
Looking good. I have no more feedback. This just needs tests and the integration tests to pass.
How do you want to proceed regarding the exit code protocol?
Just so I feel safer with the next refactoring.
We want to check what is written to stdout, not the implementation details of which event handler writes what.
The previous implementation only worked for exit codes of one character and had repeated magic numbers.
4564909
to
97a1353
Compare
57fb669
to
10aeb1e
Compare
This option was lost in the recent rewrite.
10aeb1e
to
7d902ab
Compare
📦 Released in |
This is fixing #295.