Skip to content

Parser does not support @babel/plugin-proposal-optional-chaining #136

Closed
@krousseau-cs

Description

@krousseau-cs

When using proposal-optional-chaining with babel, the typescript-eslint parser can not resolve the code. It throws the following error: "Parsing error: Expression expected"

err?.errors?.length

This parses correctly with babel-eslint parser.

More generally, is the plan to support all of the babel proposal plugins within typescript-eslint? Now that babel has first class support for typescript, using the 2 in conjunction will be a very common use case.

package version
@typescript-eslint/parser 1.1.0
TypeScript 3.2.4
ESLint 5.12.1
node 10.13.0
npm 6.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: parserIssues related to @typescript-eslint/parsertriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions