-
-
Notifications
You must be signed in to change notification settings - Fork 70
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 Replacing CLIEngine
#40
Conversation
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.
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. |
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 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.
|
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.
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 ofCLIEngine
class as returningPromise
and addsCLIEngineSync
class for soft-migration.This RFC adds a new class
LinterShell
that provides asynchronous API and deprecatesCLIEngine
.Related Issues
ERR_REQUIRE_ESM
when requiring.eslintrc.js
eslint#12319 -ERR_REQUIRE_ESM
when requiring.eslintrc.js