diff --git a/lib/rules/jsx-props-no-spreading.js b/lib/rules/jsx-props-no-spreading.js index a737fe7f9e..d4cd50d054 100644 --- a/lib/rules/jsx-props-no-spreading.js +++ b/lib/rules/jsx-props-no-spreading.js @@ -83,19 +83,25 @@ module.exports = { const tagName = node.parent.name.name; const isHTMLTag = tagName && tagName[0] !== tagName[0].toUpperCase(); const isCustomTag = tagName && tagName[0] === tagName[0].toUpperCase(); - if (isHTMLTag && + if ( + isHTMLTag && ((ignoreHtmlTags && !isException(tagName, exceptions)) || - (!ignoreHtmlTags && isException(tagName, exceptions)))) { + (!ignoreHtmlTags && isException(tagName, exceptions))) + ) { return; } - if (isCustomTag && + if ( + isCustomTag && ((ignoreCustomTags && !isException(tagName, exceptions)) || - (!ignoreCustomTags && isException(tagName, exceptions)))) { + (!ignoreCustomTags && isException(tagName, exceptions))) + ) { return; } - if (ignoreExplicitSpread && + if ( + ignoreExplicitSpread && node.argument.type === 'ObjectExpression' && - node.argument.properties.every(isProperty)) { + node.argument.properties.every(isProperty) + ) { return; } context.report({