Support React.forwardRef ignore using noSideEffectsWhenCalled
igoldny opened this issue · 0 comments
igoldny commented
When using React.forwardRef
i get eslint error: Cannot determine side-effects of mutating function return value
adding it to noSideEffectsWhenCalled
doesn't help filter return value errors.
for example:
const ErrorPage = React.forwardRef((props, ref) => (
<div ref={ref} {...props} />
));
with lint rule:
"noSideEffectsWhenCalled": [
{
"module": "react",
"functions": ["forwardRef"]
}
]
or
"noSideEffectsWhenCalled": [
{
"module": "react",
"functions": "*"
}
]
could you please advise how this issue could be resolved?