mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +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
99 lines
4.0 KiB
JSON
99 lines
4.0 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":33,"index":55}},
|
|
"errors": [
|
|
"SyntaxError: Identifier 'foo' has already been declared. (2:21)",
|
|
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:21)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":33,"index":55}},
|
|
"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":55,"loc":{"start":{"line":2,"column":0,"index":22},"end":{"line":2,"column":33,"index":55}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":29,"end":55,"loc":{"start":{"line":2,"column":7,"index":29},"end":{"line":2,"column":33,"index":55}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":35,"end":54,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":32,"index":54}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":35,"end":48,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":26,"index":48}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":37,"end":46,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":24,"index":46}},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":37,"end":41,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":19,"index":41},"identifierName":"foo2"},
|
|
"name": "foo2"
|
|
},
|
|
"computed": false,
|
|
"method": false,
|
|
"shorthand": false,
|
|
"value": {
|
|
"type": "Identifier",
|
|
"start":43,"end":46,"loc":{"start":{"line":2,"column":21,"index":43},"end":{"line":2,"column":24,"index":46},"identifierName":"foo"},
|
|
"name": "foo"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"start":51,"end":54,"loc":{"start":{"line":2,"column":29,"index":51},"end":{"line":2,"column":32,"index":54},"identifierName":"bar"},
|
|
"name": "bar"
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|