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.
<object /> uses Keyword type instead of JSXIdentifier #315
Closed
Description
What version of typescript-eslint-parser
are you using?
8062515
What code were you trying to parse?
<object />
What did you expect to happen?
The object
node to be of type JSXIdentifier
.
What happened?
It was of type Keyword
. We don't handle the type Keyword
anywhere else in prettier. Note, this only happens for <object />
, <try />
... <a />
, <div />
are working just fine.
"expression": {
"type": "JSXElement",
"range": [
0,
10
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 10
}
},
"openingElement": {
"type": "JSXOpeningElement",
"range": [
0,
10
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 10
}
},
"selfClosing": true,
"name": {
"type": "Keyword", // <-----------------
"start": 1,
"end": 7,
"range": [
1,
7
],
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 7
}
},
"name": "object"
},
"attributes": []
},
"closingElement": null,
"children": []
}
}