rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,283 lines (1,282 loc) • 300 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2167,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 98,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 48,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 48
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Component"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Component"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 26,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 47
}
},
"value": "../../src/core/bane",
"rawValue": "../../src/core/bane",
"raw": "\"../../src/core/bane\""
}
},
{
"type": "ImportDeclaration",
"start": 49,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 42
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 56,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 56,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Arkham"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 68,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 42
}
},
"value": "../../src/core/arkham",
"rawValue": "../../src/core/arkham",
"raw": "\"../../src/core/arkham\""
}
},
{
"type": "VariableDeclaration",
"start": 93,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 97,
"end": 126,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 97,
"end": 103,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 10
}
},
"name": "expect"
},
"init": {
"type": "CallExpression",
"start": 106,
"end": 126,
"loc": {
"start": {
"line": 4,
"column": 13
},
"end": {
"line": 4,
"column": 33
}
},
"callee": {
"type": "Identifier",
"start": 106,
"end": 113,
"loc": {
"start": {
"line": 4,
"column": 13
},
"end": {
"line": 4,
"column": 20
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 114,
"end": 125,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 32
}
},
"value": "expect.js",
"rawValue": "expect.js",
"raw": "\"expect.js\""
}
]
}
}
],
"kind": "var",
"trailingComments": [
{
"type": "Block",
"value": "* @test {Component} ",
"start": 129,
"end": 153,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 24
}
},
"range": [
129,
153
]
}
]
},
{
"type": "ExpressionStatement",
"start": 154,
"end": 2166,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 97,
"column": 3
}
},
"expression": {
"type": "CallExpression",
"start": 154,
"end": 2165,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 97,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 154,
"end": 162,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 8
}
},
"name": "describe",
"leadingComments": null
},
"arguments": [
{
"type": "Literal",
"start": 163,
"end": 174,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 20
}
},
"value": "bane core",
"rawValue": "bane core",
"raw": "\"bane core\""
},
{
"type": "ArrowFunctionExpression",
"start": 176,
"end": 2164,
"loc": {
"start": {
"line": 7,
"column": 22
},
"end": {
"line": 97,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 182,
"end": 2164,
"loc": {
"start": {
"line": 7,
"column": 28
},
"end": {
"line": 97,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 186,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 10,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 186,
"end": 262,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 10,
"column": 4
}
},
"callee": {
"type": "Identifier",
"start": 186,
"end": 188,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 4
}
},
"name": "it"
},
"arguments": [
{
"type": "Literal",
"start": 189,
"end": 214,
"loc": {
"start": {
"line": 8,
"column": 5
},
"end": {
"line": 8,
"column": 30
}
},
"value": "should have a component",
"rawValue": "should have a component",
"raw": "\"should have a component\""
},
{
"type": "ArrowFunctionExpression",
"start": 216,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 32
},
"end": {
"line": 10,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 222,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 38
},
"end": {
"line": 10,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 228,
"end": 257,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 33
}
},
"expression": {
"type": "CallExpression",
"start": 228,
"end": 256,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 32
}
},
"callee": {
"type": "MemberExpression",
"start": 228,
"end": 254,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 30
}
},
"object": {
"type": "MemberExpression",
"start": 228,
"end": 251,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 27
}
},
"object": {
"type": "MemberExpression",
"start": 228,
"end": 248,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 24
}
},
"object": {
"type": "CallExpression",
"start": 228,
"end": 245,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 21
}
},
"callee": {
"type": "Identifier",
"start": 228,
"end": 234,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
}
},
"name": "expect"
},
"arguments": [
{
"type": "Identifier",
"start": 235,
"end": 244,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 20
}
},
"name": "Component"
}
]
},
"property": {
"type": "Identifier",
"start": 246,
"end": 248,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 24
}
},
"name": "to"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 249,
"end": 251,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 27
}
},
"name": "be"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 252,
"end": 254,
"loc": {
"start": {
"line": 9,
"column": 28
},
"end": {
"line": 9,
"column": 30
}
},
"name": "ok"
},
"computed": false
},
"arguments": []
}
}
]
}
}
],
"_esdocTestId": 29,
"_esdocTestName": "it29"
}
},
{
"type": "ExpressionStatement",
"start": 267,
"end": 542,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 22,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 267,
"end": 541,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 22,
"column": 4
}
},
"callee": {
"type": "Identifier",
"start": 267,
"end": 269,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 4
}
},
"name": "it"
},
"arguments": [
{
"type": "Literal",
"start": 270,
"end": 308,
"loc": {
"start": {
"line": 12,
"column": 5
},
"end": {
"line": 12,
"column": 43
}
},
"value": "should be able to define a component",
"rawValue": "should be able to define a component",
"raw": "\"should be able to define a component\""
},
{
"type": "ArrowFunctionExpression",
"start": 310,
"end": 540,
"loc": {
"start": {
"line": 12,
"column": 45
},
"end": {
"line": 22,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 316,
"end": 540,
"loc": {
"start": {
"line": 12,
"column": 51
},
"end": {
"line": 22,
"column": 3
}
},
"body": [
{
"type": "ClassDeclaration",
"start": 322,
"end": 435,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 328,
"end": 340,
"loc": {
"start": {
"line": 13,
"column": 10
},
"end": {
"line": 13,
"column": 22
}
},
"name": "FooComponent"
},
"superClass": {
"type": "Identifier",
"start": 349,
"end": 358,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 13,
"column": 40
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 358,
"end": 435,
"loc": {
"start": {
"line": 13,
"column": 40
},
"end": {
"line": 18,
"column": 5
}
},
"body": [
{
"type": "MethodDefinition",
"start": 366,
"end": 414,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 16,
"column": 7
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 366,
"end": 376,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 14,
"column": 16
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 376,
"end": 414,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 16,
"column": 7
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 379,
"end": 414,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 16,
"column": 7
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 389,
"end": 406,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 389,
"end": 405,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 389,
"end": 397,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 389,
"end": 393,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 394,
"end": 397,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 16
}
},
"name": "bar"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 400,
"end": 405,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 24
}
},
"value": "baz",
"rawValue": "baz",
"raw": "\"baz\""
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 421,
"end": 429,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 14
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 421,
"end": 424,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 9
}
},
"name": "foo"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 424,
"end": 429,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 14
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 427,
"end": 429,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 14
}
},
"body": []
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"start": 441,
"end": 487,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 50
}
},
"expression": {
"type": "CallExpression",
"start": 441,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 49
}
},
"callee": {
"type": "MemberExpression",
"start": 441,
"end": 474,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 37
}
},
"object": {
"type": "MemberExpression",
"start": 441,
"end": 471,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 34
}
},
"object": {
"type": "CallExpression",
"start": 441,
"end": 468,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 31
}
},
"callee": {
"type": "Identifier",
"start": 441,
"end": 447,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 10
}
},
"name": "expect"
},
"arguments": [
{
"type": "UnaryExpression",
"start": 448,
"end": 467,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {
"line": 20,
"column": 30
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 455,
"end": 467,
"loc": {
"start": {
"line": 20,
"column": 18
},
"end": {
"line": 20,
"column": 30
}
},
"name": "FooComponent"
}
}
]
},
"property": {
"type": "Identifier",
"start": 469,
"end": 471,
"loc": {
"start": {
"line": 20,
"column": 32
},
"end": {
"line": 20,
"column": 34
}
},
"name": "to"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 472,
"end": 474,
"loc": {
"start": {
"line": 20,
"column": 35
},
"end": {
"line": 20,
"column": 37
}
},
"name": "be"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 475,
"end": 485,
"loc": {
"start": {
"line": 20,
"column": 38
},
"end": {
"line": 20,
"column": 48
}
},
"value": "function",
"rawValue": "function",
"raw": "\"function\""
}
]
}
},
{
"type": "ExpressionStatement",
"start": 492,
"end": 536,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 48
}
},
"expression": {
"type": "CallExpression",
"start": 492,
"end": 535,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 47
}
},
"callee": {
"type": "MemberExpression",
"start": 492,
"end": 528,
"loc": {
"start": {
"line": 21,
"column": 4
},