-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Unless I am mistaken, it seems today that the rule react/no-danger
has specific logic to only find usages on native elements. See the isDOMComponent
check here:
if (jsxUtil.isDOMComponent(node.parent) && isDangerous(node.name.name)) { |
We think it could be useful to support non-native components as well, especially in cases like styled-components
wrappers, or components that want to offer this prop to be forwarded internally to a native element.
This could be a new default behavior, or an opt-in behavior via a new rule option.
limbuster, ckcr4lyf and akulsr0