File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ obj[foo ]
48
48
obj[ ' foo' ]
49
49
var x = {[ b ]: a}
50
50
obj[foo[ bar ]]
51
+
52
+ const { [ a ]: someProp } = obj;
53
+ ({ [ b ]: anotherProp } = anotherObj);
51
54
```
52
55
53
56
Examples of ** correct** code for this rule with the default ` "never" ` option:
@@ -60,6 +63,9 @@ obj[foo]
60
63
obj[' foo' ]
61
64
var x = {[b]: a}
62
65
obj[foo[bar]]
66
+
67
+ const { [a ]: someProp } = obj;
68
+ ({ [b]: anotherProp } = anotherObj);
63
69
```
64
70
65
71
### always
@@ -76,6 +82,8 @@ obj[ foo]
76
82
obj[' foo' ]
77
83
obj[foo[ bar ]]
78
84
var x = {[ b]: a}
85
+ const { [a ]: someProp } = obj;
86
+ ({ [b ]: anotherProp } = anotherObj);
79
87
```
80
88
81
89
Examples of ** correct** code for this rule with the ` "always" ` option:
@@ -88,6 +96,8 @@ obj[ foo ]
88
96
obj[ ' foo' ]
89
97
var x = {[ b ]: a}
90
98
obj[ foo[ bar ] ]
99
+ const { [ a ]: someProp } = obj;
100
+ ({ [ b ]: anotherProp } = anotherObj);
91
101
```
92
102
93
103
#### enforceForClassMembers
You can’t perform that action at this time.
0 commit comments