Skip to content

Commit 7aa4a03

Browse files
authored
Merge pull request #1794 from yannickcr/lencioni-patch-1
Add a when not to use case to forbid-foreign-prop-types
2 parents 668d7cc + 1ae949c commit 7aa4a03

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)