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
Support Object.assign, et al, for bool-prop-naming
With `propObjectAssignFunctions` set in settings like so:
```
{
...
propOjectAssignFunctions: ["Object.assign"]
...
}
```
One can use `Object.assign` for setting the propTypes like this:
```
function Foo() {...}
Foo.propTypes = Object.assign({}, morePropTypes, { isLoading:
PropTypes.bool });
```
And the boolean-prop-naming rule should be able to verify the prop
`isLoading` against the defined options.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ You can also specify some settings that will be shared across all the plugin rul
43
43
"flowVersion":"0.53"// Flow version
44
44
},
45
45
"propWrapperFunctions": [ "forbidExtraProps" ] // The names of any functions used to wrap the propTypes object, such as `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
46
+
"propObjectAssignFunctions": [ "Object.assign" ] // The names of functions used to merge props when declaring propTypes. If this isn't set, any propTypes set using any assign/merge function will be skipped.
0 commit comments