Skip to content

@babel/parser: differences between Espree when using ESTree plugin #10826

Closed

Description

@kaicataldo

Bug Report

Current Behavior
There are a few cases for newer where @babel/parser deviates from ESTree. These should be aligned so that @babel/eslint-parser works correctly with existing ESLint rules.

Dynamic Imports

@babel/parser currently parses dynamic imports (import('a')) as CallExpressions (code here). The ESTree spec differs from this and gives it its own type called ImportExpression.

BigInt Literals

@babel/parser currently parses BigInt Literals (1n) as BigIntLiteral. The ESTree spec differs from this and gives it the type Literal and adds the bigint property (see spec here).

Input Code
N/A

Expected behavior/code
N/A

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
N/A

Environment
N/A

Possible Solution
This should be fixed in the ESTree plugin for @babel/parser.

Activity

  1. self-assigned this
    on Dec 6, 2019
  2. changed the title [-]@babel/parser: dynamic imports have incorrect type when using ESTree plugin[/-] [+]@babel/parser: differences between Espree when using ESTree plugin[/+] on Dec 6, 2019
  3. kaicataldo commented on Dec 11, 2019

    @kaicataldo
    MemberAuthor

    These issues have been fixed.

  4. added
    outdated
    on Mar 12, 2020
  5. locked as resolved and limited conversation to collaborators on Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: estreeoutdatedpkg: parser

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions