mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* chore: bump eslint and espree * fix: always initialize ExportDeclaration attributes * update AST fixtures * fix: initialize attributes when importAssertions is not enabled * update AST fixtures * update test snapshot * update Makefile.js * update Babel 8 AST fixtures
108 lines
4.5 KiB
JSON
108 lines
4.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":57,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":35,"index":57}},
|
|
"errors": [
|
|
"SyntaxError: Identifier 'foo' has already been declared. (2:23)",
|
|
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:23)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":57,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":35,"index":57}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":0,"end":21,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":21,"index":21}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":7,"end":21,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":21,"index":21}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":13,"end":20,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":20,"index":20}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":13,"end":16,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":16,"index":16},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"init": {
|
|
"type": "NumericLiteral",
|
|
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20}},
|
|
"extra": {
|
|
"rawValue": 1,
|
|
"raw": "1"
|
|
},
|
|
"value": 1
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
},
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":22,"end":57,"loc":{"start":{"line":2,"column":0,"index":22},"end":{"line":2,"column":35,"index":57}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":29,"end":57,"loc":{"start":{"line":2,"column":7,"index":29},"end":{"line":2,"column":35,"index":57}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":35,"end":56,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":34,"index":56}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":35,"end":50,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":28,"index":50}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":37,"end":40,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":18,"index":40}},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":37,"end":40,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":18,"index":40},"identifierName":"bar"},
|
|
"name": "bar"
|
|
},
|
|
"computed": false,
|
|
"method": false,
|
|
"shorthand": true,
|
|
"value": {
|
|
"type": "Identifier",
|
|
"start":37,"end":40,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":18,"index":40},"identifierName":"bar"},
|
|
"name": "bar"
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"start":42,"end":48,"loc":{"start":{"line":2,"column":20,"index":42},"end":{"line":2,"column":26,"index":48}},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"start":45,"end":48,"loc":{"start":{"line":2,"column":23,"index":45},"end":{"line":2,"column":26,"index":48},"identifierName":"foo"},
|
|
"name": "foo"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"start":53,"end":56,"loc":{"start":{"line":2,"column":31,"index":53},"end":{"line":2,"column":34,"index":56},"identifierName":"baz"},
|
|
"name": "baz"
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|