Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Missing .name from this JSXIdentifier #307

Closed
@vjeux

Description

@vjeux

What version of typescript-eslint-parser are you using?
32634f1

What code were you trying to parse?

<this.state.Component />;

What did you expect to happen?

To have "name": "this" on JSXIdentifier like for babylon and flow.

What happened?

JSXIdentifier doesn't have a "name" field.

            "object": {
              "type": "JSXMemberExpression",
              "range": [
                1,
                11
              ],
              "loc": {
                "start": {
                  "line": 1,
                  "column": 1
                },
                "end": {
                  "line": 1,
                  "column": 11
                }
              },
              "object": {
                "type": "JSXIdentifier",
                "range": [
                  1,
                  5
                ],
                "loc": {
                  "start": {
                    "line": 1,
                    "column": 1
                  },
                  "end": {
                    "line": 1,
                    "column": 5
                  }
                } // no name!
              },
              "property": {
                "type": "JSXIdentifier",
                "range": [
                  6,
                  11
                ],
                "loc": {
                  "start": {
                    "line": 1,
                    "column": 6
                  },
                  "end": {
                    "line": 1,
                    "column": 11
                  }
                },
                "name": "state"
              }
            },
            "property": {
              "type": "JSXIdentifier",
              "range": [
                12,
                21
              ],
              "loc": {
                "start": {
                  "line": 1,
                  "column": 12
                },
                "end": {
                  "line": 1,
                  "column": 21
                }
              },
              "name": "Component"
            }
          },
          "attributes": []
        },

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions