Skip to content

[Bug]: Some SyntaxErrors still ignore startLine option. #14123

@tolmasky

Description

@tolmasky

💻

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

require("@babel/parser").parse("import.meta", { sourceType:"script", startLine: 10 })

Configuration file name

No response

Configuration

N/A

Current and expected behavior

Following up from #9015, it appears only some of the SyntaxErrors were fixed to take into account he startLine option. As you can see in the example above, it is still possible to get SyntaxErrors with the unadjusted line number. Others however do respect it.

Environment

Possible solution

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions