Skip to content

Commit

Permalink
[Docs] prop-types: Update 'skipUndeclared' in rule options
Browse files Browse the repository at this point in the history
 - Updated description to indicate it's of type boolean.
 - Included 'skipUndeclared' in rule option's snippet.
  • Loading branch information
cjnickel authored and ljharb committed Nov 22, 2019
1 parent 87d4cab commit 62df1dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/prop-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ This rule can take one argument to ignore some specific props during validation.

```js
...
"react/prop-types": [<enabled>, { ignore: <ignore>, customValidators: <customValidator> }]
"react/prop-types": [<enabled>, { ignore: <ignore>, customValidators: <customValidator>, skipUndeclared: <skipUndeclared> }]
...
```

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

### As for "exceptions"

Expand Down

0 comments on commit 62df1dd

Please sign in to comment.