Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
New:
ESLint
Class ReplacingCLIEngine
#40New:
ESLint
Class ReplacingCLIEngine
#40Changes from 12 commits
b1840be
6135383
0af99b0
d9444ef
e5cc07c
be5878c
628e262
cade0bd
c99ae56
730cb58
2ab427f
ed35022
13354ce
2aa4a5e
8892dc7
7a94b03
7b5e401
2981228
72e69af
86689ec
a76d6c0
face206
65b67f5
cedb6e6
8f58df9
227fe54
4c5cdff
00be95b
756e929
975fa02
f22894b
d45e86e
c5bdf22
6ecf034
98243b8
13650ff
a860d00
eeac990
6a36a14
ab978fa
920c881
8547265
c24f337
9d4affc
5032c3c
671cf6a
ef4d198
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
See my previous comment. Should probably be more fleshed out the intention of why this is an async generator and how that would work right here and now and how that would work eventually in the future.
It should probably also be added some reasoning on why the formatters are okay with being pure async generators while
executeOnFiles
has been made a cross-product of async generators and promises. Should the two be consistent in that regard?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.
Because formatters are used to output results to stdout or a file, and both are streams, so I didn't think that it should be Thenable.
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.
May I suggest adding something similar to:
Like:
That way any plugin which wants to move to fully use the new async features can do so without risking incompatibilities with the sync flow.
If that property is set on a plugin, then the sync flow of
CLIEngine
should error when encountering it and tell the user about the incompatibility.This would help the ecosystem in regards to the deprecation and the move towards an async flow.
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.
I'm not sure if there are incompatibility things about this. We don't provide any asynchronous API to plugins. On the other hand, running in parallel can break plugins that use OS resources exclusively (e.g., cache file).
In the future, if we support asynchronous stuff for plugins (e.g., ES modules. It requires
import()
to load the plugins),CLIEngine
fails to load those. I don't think that we need additional flags.