Skip to content

Commit 62df1dd

Browse files
cjnickelljharb
authored andcommitted
[Docs] prop-types: Update 'skipUndeclared' in rule options
- Updated description to indicate it's of type boolean. - Included 'skipUndeclared' in rule option's snippet.
1 parent 87d4cab commit 62df1dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rules/prop-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ This rule can take one argument to ignore some specific props during validation.
102102

103103
```js
104104
...
105-
"react/prop-types": [<enabled>, { ignore: <ignore>, customValidators: <customValidator> }]
105+
"react/prop-types": [<enabled>, { ignore: <ignore>, customValidators: <customValidator>, skipUndeclared: <skipUndeclared> }]
106106
...
107107
```
108108

109109
* `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
110110
* `ignore`: optional array of props name to ignore during validation.
111111
* `customValidators`: optional array of validators used for propTypes validation.
112-
* `skipUndeclared`: only error on components that have a propTypes block declared
112+
* `skipUndeclared`: optional boolean to only error on components that have a propTypes block declared.
113113

114114
### As for "exceptions"
115115

0 commit comments

Comments
 (0)