We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 483ae9e commit 0091ac8Copy full SHA for 0091ac8
lib/rules/jsx-key.js
@@ -90,16 +90,12 @@ module.exports = {
90
function checkIteratorElement(node) {
91
if (node.type === 'JSXElement') {
92
if (!hasProp(node.openingElement.attributes, 'key')) {
93
- report(context, messages.missingIterKey, 'missingIterKey', {
94
- node,
95
- });
+ report(context, messages.missingIterKey, 'missingIterKey', { node });
96
} else {
97
const attrs = node.openingElement.attributes;
98
99
if (checkKeyMustBeforeSpread && isKeyAfterSpread(attrs)) {
100
- report(context, messages.keyBeforeSpread, 'keyBeforeSpread', {
101
- node: node.type === 'ArrayExpression' ? node : node.parent,
102
+ report(context, messages.keyBeforeSpread, 'keyBeforeSpread', { node });
103
}
104
105
} else if (checkFragmentShorthand && node.type === 'JSXFragment') {
0 commit comments