-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
I am using the airbnb style guide, which enables the react/style-prop-object rule. For most use cases this is fine. However, I just started implementing react-intl. This exposes a <FormattedNumber> component which accepts a style prop. This triggers the react/style-prop-object rule.
I think it’s generally a bad practice to create props using such standarized names, but third party libraries might. I suggest adding an option to this rule, which defines an array of component names for which different style prop types are allowed.
For example:
{
"rules": {
"react/style-prop-object": [
"error",
{"allow": ["FormattedNumber"]}
]
}
}gtkatakura-bysoft, kmrsfrnc, yapuka, subalee, xehpuk and 6 more