diff --git a/lib/rules/forbid-foreign-prop-types.js b/lib/rules/forbid-foreign-prop-types.js index 982119af1c..20d191d264 100644 --- a/lib/rules/forbid-foreign-prop-types.js +++ b/lib/rules/forbid-foreign-prop-types.js @@ -109,7 +109,7 @@ module.exports = { && !ast.isAssignmentLHS(node) && !isAllowedAssignment(node) )) || ( - // @ts-expect-error: Literal is not a valid type + // @ts-expect-error: The JSXText type is not present in the estree type definitions (node.property.type === 'Literal' || node.property.type === 'JSXText') && 'value' in node.property && node.property.value === 'propTypes'