Open Janpot opened 1 year ago
v7.31.10 => v7.31.11: upgrade results in a several false positives where uncapitalized functions that have a property assigned of either propTypes or defaultProps are detected as React components. (https://app.circleci.com/pipelines/github/mui/material-ui/85664/workflows/ddd6c2d7-00bc-4faf-bd09-f870eb96be44/jobs/452797) This is new behavior. Not sure if intended?
propTypes
defaultProps
example:
// Function component is not a function declaration const fn = () => 'foo' fn.propTypes = {}
Other than the identifier not being capitalized, that’s a react component, and the propTypes makes it a certainty. Why would anything that’s not a React component have propTypes??
v7.31.10 => v7.31.11: upgrade results in a several false positives where uncapitalized functions that have a property assigned of either
propTypes
ordefaultProps
are detected as React components. (https://app.circleci.com/pipelines/github/mui/material-ui/85664/workflows/ddd6c2d7-00bc-4faf-bd09-f870eb96be44/jobs/452797) This is new behavior. Not sure if intended?example: