Skip to content

Commit 1ae949c

Browse files
authored
Add a when not to use case to forbid-foreign-prop-types
1 parent 668d7cc commit 1ae949c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/rules/forbid-foreign-prop-types.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ import SomeComponent, {propTypes as someComponentPropTypes} from './SomeComponen
2828
## When not to use
2929

3030
This rule aims to make a certain production optimization, removing prop types, less prone to error. This rule may not be relevant to you if you do not wish to make use of this optimization.
31+
32+
If you are writing a higher-order component that hoists the wrapped component's propTypes, you might want to disable this rule.

0 commit comments

Comments
 (0)