Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Mar 23, 2018
1 parent 150b775 commit 805c8ea
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/rules/forbid-component-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,21 @@ The following patterns are **not** considered warnings:

```js
...
"react/forbid-component-props": [<enabled>, { "forbid": [<string>] }]
"react/forbid-component-props": [<enabled>, { "forbid": [<string>|<object>] }]
...
```

### `forbid`

An array of strings, with the names of props that are forbidden. The default value of this option is `['className', 'style']`.
An array specifying the names of props that are forbidden. The default value of this option is `['className', 'style']`.
Each array element can either be a string with the property name or object specifying the property name and a component whitelist:

```js
{
"propName": "someProp",
"allowedFor": [SomeComponent, AnotherComponent]
}
```


### Related rules
Expand Down

0 comments on commit 805c8ea

Please sign in to comment.