You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've managed to reduce the problem to the following:
// Just to check if eslint is alive, to get indent warnconsta=4;constQ: React.FC<{p: (props: any)=>React.ReactNode}>=(p)=>{return<></>}exportconstF: React.FC=()=>{return(<Qp={()=><></>}>
a
</Q>);};
Until that a is removed or /* eslint react-native/no-raw-text: 0 */ is added, the eslint will stop working for the entire file. No warns, no errors.
Looks like the problem comes from the inline function above. The error persists if p={() => 4}, but it's gone if p={4 as any}.
It doesn't happen if function x() {} and passing x to p.
It also happens even if the inline function isn't in the component wrapping the raw-text:
exportconstF: React.FC=()=>{return(<View>
a
<View><Qp={()=>4asany}></Q></View></View>);};
So, if there is a component that contains an inline function and if no-raw-text rule is active and there is a raw-text in the same component, this error will happen.
The text was updated successfully, but these errors were encountered:
I've managed to reduce the problem to the following:
Until that
a
is removed or/* eslint react-native/no-raw-text: 0 */
is added, the eslint will stop working for the entire file. No warns, no errors.Looks like the problem comes from the inline function above. The error persists if
p={() => 4}
, but it's gone ifp={4 as any}
.It doesn't happen if
function x() {}
and passingx
top
.It also happens even if the inline function isn't in the component wrapping the raw-text:
So, if there is a component that contains an inline function and if no-raw-text rule is active and there is a raw-text in the same component, this error will happen.
The text was updated successfully, but these errors were encountered: