New: ESLint Class Replacing CLIEngine#40
Conversation
ilyavolodin
left a comment
There was a problem hiding this comment.
This would be a major breaking change, that will affect all integrations. I don't think it's justified at all. I think it would be better to do it the other way around. Introduce CLIEngineAsync with async properties, and keep existing CLIEngine synchronous. In that case, it will be a non-breaking change.
|
There is the reason I didn't write reverse.
Multiple functionalities require async API and sync API looks closing doors for the future. |
|
The opposite is also true: |
|
In fact, don't you think you want to add the parallel linting feature? The parallel linting requires async API and your statement sounds to strongly oppose it. |
|
No, you are misunderstanding me. I'm not against introduction of async API. I just don't think it should be default API that we expose, as it would be a huge breaking change, and I don't see enough justification for it. I'm perfectly fine with leaving default API as sync, and introducing a new async API as optional. Parallel linting doesn't require async API, it would make things a lot simple, but it can be achieved without async API. |
|
Thank you for clarification. How about adding a new class and deprecating I remember the name of
Out of curiosity, how can we implement it? As far as I know, |
|
I think deprecating CLIEngine is a better path forward. It would still be a breaking change, but as long as we keep CLIEngine around, it will not break existing integrations. |
|
I got it. Thank you for your feedback. I'm rewriting this RFC. |
|
I have updated this RFC. |
ilyavolodin
left a comment
There was a problem hiding this comment.
I think this approach is much better direction then before. But I still wonder if alternative that you mention would be even easier approach?
|
I updated this RFC as changing |
|
I updated this RFC as reconsider some methods with Async Iteration.
|
platinumazure
left a comment
There was a problem hiding this comment.
Looks pretty good so far. I'll continue to follow this discussion.
|
I updated this RFC.
|
Blocked by New: Drop supports for Node.js 8.x and 11.x #44.(merged)Summary
This RFC changes the methods ofCLIEngineclass as returningPromiseand addsCLIEngineSyncclass for soft-migration.This RFC adds a new class
LinterShellthat provides asynchronous API and deprecatesCLIEngine.Related Issues
ERR_REQUIRE_ESMwhen requiring.eslintrc.jseslint#12319 -ERR_REQUIRE_ESMwhen requiring.eslintrc.js