Skip to content

Commit 9a4eeba

Browse files
author
Evgueni Naverniouk
committed
Minor documentation updates for no-unused-prop-types rule for issue 976
1 parent 5827897 commit 9a4eeba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/rules/no-unused-prop-types.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ This rule can take one argument to ignore some specific props during validation.
5353

5454
* `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
5555
* `customValidators`: optional array of validators used for propTypes validation.
56-
* `skipShapeProps`: In some cases it is impossible to accurately detect whether or not a `React.PropTypes.shape`'s values are being used. Setting this option to `true` will skip validation of `PropTypes.shape`.
56+
* `skipShapeProps`: In some cases it is impossible to accurately detect whether or not a `React.PropTypes.shape`'s values are being used. Setting this option to `true` will skip validation of `PropTypes.shape` (`true` by default).
57+
58+
## Caveats
59+
60+
This rule does not track component props as they move from function to function or during variable renaming (such as in the event of prop object destructuring assignments). As such, it's prone to false positives in situations where the prop use cannot be accurately detected.
5761

5862
## About component detection
5963

0 commit comments

Comments
 (0)