Skip to content

Commit

Permalink
chore: add sourceType: unambiguous test
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Aug 13, 2020
1 parent c4afd22 commit cb65cb3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 32 deletions.
@@ -1,31 +1,15 @@
{
"type": "BinaryExpression",
"start": 19,
"end": 28,
"loc": {
"start": { "line": 2, "column": 0 },
"end": { "line": 2, "column": 9 }
},
"start":19,"end":28,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":9}},
"left": {
"type": "Identifier",
"start": 19,
"end": 24,
"loc": {
"start": { "line": 2, "column": 0 },
"end": { "line": 2, "column": 5 },
"identifierName": "await"
},
"start":19,"end":24,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":5},"identifierName":"await"},
"name": "await"
},
"operator": "+",
"right": {
"type": "NumericLiteral",
"start": 26,
"end": 28,
"loc": {
"start": { "line": 2, "column": 7 },
"end": { "line": 2, "column": 9 }
},
"start":26,"end":28,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":9}},
"extra": {
"rawValue": 42,
"raw": "42"
Expand All @@ -36,24 +20,14 @@
{
"type": "CommentLine",
"value": " prettier-ignore",
"start": 0,
"end": 18,
"loc": {
"start": { "line": 1, "column": 0 },
"end": { "line": 1, "column": 18 }
}
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}}
}
],
"comments": [
{
"type": "CommentLine",
"value": " prettier-ignore",
"start": 0,
"end": 18,
"loc": {
"start": { "line": 1, "column": 0 },
"end": { "line": 1, "column": 18 }
}
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}}
}
]
}
}
@@ -0,0 +1,2 @@
// prettier-ignore
await +42
@@ -0,0 +1,3 @@
{
"sourceType": "unambiguous"
}
@@ -0,0 +1,33 @@
{
"type": "BinaryExpression",
"start":19,"end":28,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":9}},
"left": {
"type": "Identifier",
"start":19,"end":24,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":5},"identifierName":"await"},
"name": "await"
},
"operator": "+",
"right": {
"type": "NumericLiteral",
"start":26,"end":28,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":9}},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
},
"leadingComments": [
{
"type": "CommentLine",
"value": " prettier-ignore",
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}}
}
],
"comments": [
{
"type": "CommentLine",
"value": " prettier-ignore",
"start":0,"end":18,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":18}}
}
]
}

0 comments on commit cb65cb3

Please sign in to comment.