File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -90,16 +90,12 @@ module.exports = {
90
90
function checkIteratorElement ( node ) {
91
91
if ( node . type === 'JSXElement' ) {
92
92
if ( ! hasProp ( node . openingElement . attributes , 'key' ) ) {
93
- report ( context , messages . missingIterKey , 'missingIterKey' , {
94
- node,
95
- } ) ;
93
+ report ( context , messages . missingIterKey , 'missingIterKey' , { node } ) ;
96
94
} else {
97
95
const attrs = node . openingElement . attributes ;
98
96
99
97
if ( checkKeyMustBeforeSpread && isKeyAfterSpread ( attrs ) ) {
100
- report ( context , messages . keyBeforeSpread , 'keyBeforeSpread' , {
101
- node : node . type === 'ArrayExpression' ? node : node . parent ,
102
- } ) ;
98
+ report ( context , messages . keyBeforeSpread , 'keyBeforeSpread' , { node } ) ;
103
99
}
104
100
}
105
101
} else if ( checkFragmentShorthand && node . type === 'JSXFragment' ) {
You can’t perform that action at this time.
0 commit comments