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

Missing .name from this JSXIdentifier #307

Closed
vjeux opened this issue Jun 2, 2017 · 0 comments
Closed

Missing .name from this JSXIdentifier #307

vjeux opened this issue Jun 2, 2017 · 0 comments
Assignees
Labels

Comments

@vjeux
Copy link

vjeux commented Jun 2, 2017

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": []
        },
@soda0289 soda0289 added bug and removed triage labels Jun 2, 2017
vjeux added a commit to vjeux/prettier that referenced this issue Jun 2, 2017
Would be nice to get it properly handled in eslint/typescript-eslint-parser#307

Fixes prettier#1877
vjeux added a commit to vjeux/prettier that referenced this issue Jun 2, 2017
Would be nice to get it properly handled in eslint/typescript-eslint-parser#307

Fixes prettier#1877
vjeux added a commit to prettier/prettier that referenced this issue Jun 2, 2017
Would be nice to get it properly handled in eslint/typescript-eslint-parser#307

Fixes #1877
@soda0289 soda0289 self-assigned this Jun 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants