-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: spread operator (refs eslint#10)
- Loading branch information
Jamund Ferguson
committed
Feb 11, 2015
1 parent
7db96b2
commit 8d6172c
Showing
40 changed files
with
1,759 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/fixtures/ecma-features-mix/destructuring-and-spread/complex-destructured.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
spread: true, | ||
destructuring: true | ||
}; |
259 changes: 259 additions & 0 deletions
259
tests/fixtures/ecma-features-mix/destructuring-and-spread/complex-destructured.result.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,259 @@ | ||
module.exports = { | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"type": "AssignmentExpression", | ||
"operator": "=", | ||
"left": { | ||
"type": "ArrayPattern", | ||
"elements": [ | ||
{ | ||
"type": "ObjectPattern", | ||
"properties": [ | ||
{ | ||
"type": "Property", | ||
"key": { | ||
"type": "Identifier", | ||
"name": "a", | ||
"range": [ | ||
3, | ||
4 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 3 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 4 | ||
} | ||
} | ||
}, | ||
"value": { | ||
"type": "Identifier", | ||
"name": "a", | ||
"range": [ | ||
3, | ||
4 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 3 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 4 | ||
} | ||
} | ||
}, | ||
"kind": "init", | ||
"method": false, | ||
"shorthand": true, | ||
"computed": false, | ||
"range": [ | ||
3, | ||
4 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 3 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 4 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "Property", | ||
"key": { | ||
"type": "Identifier", | ||
"name": "b", | ||
"range": [ | ||
6, | ||
7 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
} | ||
}, | ||
"value": { | ||
"type": "Identifier", | ||
"name": "b", | ||
"range": [ | ||
6, | ||
7 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
} | ||
}, | ||
"kind": "init", | ||
"method": false, | ||
"shorthand": true, | ||
"computed": false, | ||
"range": [ | ||
6, | ||
7 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
} | ||
} | ||
], | ||
"range": [ | ||
1, | ||
9 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "SpreadElement", | ||
"argument": { | ||
"type": "Identifier", | ||
"name": "c", | ||
"range": [ | ||
14, | ||
15 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 14 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 15 | ||
} | ||
} | ||
}, | ||
"range": [ | ||
11, | ||
15 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 11 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 15 | ||
} | ||
} | ||
} | ||
], | ||
"range": [ | ||
0, | ||
16 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 16 | ||
} | ||
} | ||
}, | ||
"right": { | ||
"type": "Identifier", | ||
"name": "d", | ||
"range": [ | ||
19, | ||
20 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 19 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 20 | ||
} | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
20 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 20 | ||
} | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
21 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 21 | ||
} | ||
} | ||
} | ||
], | ||
"range": [ | ||
0, | ||
21 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 21 | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
tests/fixtures/ecma-features-mix/destructuring-and-spread/complex-destructured.src.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{ a, b }, ...c] = d; |
4 changes: 4 additions & 0 deletions
4
.../fixtures/ecma-features-mix/destructuring-and-spread/destructured-array-literal.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
spread: true, | ||
destructuring: true | ||
}; |
Oops, something went wrong.