Skip to content

Commit 8b9433c

Browse files
authored
docs: add object pattern to first section of computed-property-spacing (#15679)
1 parent de800c3 commit 8b9433c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/rules/computed-property-spacing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ var a = "prop";
1616
var obj = {
1717
[a]: "value" // computed property key in object literal (ECMAScript 6)
1818
};
19+
20+
var obj = { prop: "value" };
21+
var a = "prop";
22+
var { [a]: x } = obj; // computed property key in object destructuring pattern (ECMAScript 6)
1923
```
2024

2125
## Rule Details

0 commit comments

Comments
 (0)