Why
We encounter the following pattern:
- There is a parent component,
UserList, that defines a callback onSelectUser, which accepts an @inline fragment named UserList_onSelectUser_user.
- This callback is passed to a
UserDetail component as props.onSelectUser, to which a user 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.)
Why
We encounter the following pattern:
UserList, that defines a callbackonSelectUser, which accepts an@inlinefragment namedUserList_onSelectUser_user.UserDetailcomponent asprops.onSelectUser, to which auseris passed where...UserList_onSelectUser_useris spread.UserListfrom the child component, which is just silly!)We anticipate that this pattern will occur somewhat frequently for us.
What we would like feedback on
ignore: RegExpparameter 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@inlinefragments can contain_inline_in their name.)