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
Hi there! I found some tricky behaviour with define-flow-type rule:
typeA={foo: Foo};Foo();
no-undef with define-flow-type rules will not pay attention to Foo variable. It starts to be global. Yeah, Flow checks it, but see real code that cause of issue:
typeProps={children: React.Node};exportdefaultReact.memo(({ children }: Props)=>children)
Flow and eslint were not give the error. But in runtime error was thrown "React is not defined" because it does have react import.
I suggest making the option for this rule like ignoreTypes. It will be array with all types that will not were global.
What do you think about it? Thanks!
The text was updated successfully, but these errors were encountered:
Hi there! I found some tricky behaviour with
define-flow-type
rule:no-undef
withdefine-flow-type
rules will not pay attention toFoo
variable. It starts to be global. Yeah, Flow checks it, but see real code that cause of issue:Flow and eslint were not give the error. But in runtime error was thrown "React is not defined" because it does have react import.
I suggest making the option for this rule like
ignoreTypes
. It will be array with all types that will not were global.What do you think about it? Thanks!
The text was updated successfully, but these errors were encountered: