-
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.
* Fix: async shorthand properties (fixes eslint#340) * Fix: and default parameters
- Loading branch information
1 parent
ea08611
commit be85b8e
Showing
7 changed files
with
882 additions
and
4 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
205 changes: 205 additions & 0 deletions
205
tests/fixtures/ecma-version/8/not-strict/async-shorthand-property-1.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,205 @@ | ||
module.exports = { | ||
"type": "Program", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
9 | ||
], | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
9 | ||
], | ||
"expression": { | ||
"type": "ObjectExpression", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 8 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
8 | ||
], | ||
"properties": [ | ||
{ | ||
"type": "Property", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
7 | ||
], | ||
"method": false, | ||
"shorthand": true, | ||
"computed": false, | ||
"key": { | ||
"type": "Identifier", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
7 | ||
], | ||
"name": "async" | ||
}, | ||
"kind": "init", | ||
"value": { | ||
"type": "Identifier", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
7 | ||
], | ||
"name": "async" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"sourceType": "script", | ||
"tokens": [ | ||
{ | ||
"type": "Punctuator", | ||
"value": "(", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 1 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
1 | ||
] | ||
}, | ||
{ | ||
"type": "Punctuator", | ||
"value": "{", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 2 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
2 | ||
] | ||
}, | ||
{ | ||
"type": "Identifier", | ||
"value": "async", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
7 | ||
] | ||
}, | ||
{ | ||
"type": "Punctuator", | ||
"value": "}", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 7 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 8 | ||
} | ||
}, | ||
"range": [ | ||
7, | ||
8 | ||
] | ||
}, | ||
{ | ||
"type": "Punctuator", | ||
"value": ")", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
8, | ||
9 | ||
] | ||
} | ||
] | ||
}; |
1 change: 1 addition & 0 deletions
1
tests/fixtures/ecma-version/8/not-strict/async-shorthand-property-1.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 @@ | ||
({async}) |
Oops, something went wrong.