Skip to content

Change Request: allow asynchronous parserΒ #15475

Open
@golopot

Description

ESLint version

V8.0.0

What problem do you want to solve?

Eslint spent most of its time in parsing files. A javascript parser written in go or rust can potentially improve the the performance of eslint. However this is not possible now, because a parser written in go or rust can only be accessed by an asynchrous function, and eslint only accepts a synchronous parse function.

These external parsers can be accessed asynchronously by 1. Webassembly 2. Communicating to a child process using stdin/stdout or networking.

An example of parser written in rust is swc: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ .

What do you think is the correct solution?

Accept a parser with an asynchronous parse function.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

breakingThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintneeds designImportant details about this change need to be discussed

Type

No type

Projects

  • Status

    Waiting for RFC

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions