Open
Description
Why
We encounter the following pattern:
- There is a parent component,
UserList
, that defines a callbackonSelectUser
, which accepts an@inline
fragment namedUserList_onSelectUser_user
. - This callback is passed to a
UserDetail
component asprops.onSelectUser
, to which auser
is passed where...UserList_onSelectUser_user
is spread. - This eslint rule is not happy, and there is no sane way to work around this restriction, as far as I can tell. (One would have to import
UserList
from the child component, which is just silly!) - We do not want to allow users to suppress this rule, as in 99% of cases, this is a rule we don't want to let users suppress! We're still adopting Relay, so being forceful with respect to best practices is important to us.
We anticipate that this pattern will occur somewhat frequently for us.
What we would like feedback on
- Would an
ignore: RegExp
parameter to the rule be an accepted addition? Namely, we would like to opt out of this lint rule by having certain inline fragments contain_inline_
in their name. (We would pair this with an additional rule, probably Pinterest-only, that enforced that only@inline
fragments can contain_inline_
in their name.)
Metadata
Assignees
Labels
No labels