Skip to content

Commit 5bed121

Browse files
committed
chore(docs): imporve documentation
1 parent c8ff39e commit 5bed121

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/rules/require-default-props.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ NotAComponent.propTypes = {
212212
- `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
213213
- `forbidDefaultForRequired`: optional boolean to forbid prop default for a required prop. Defaults to false.
214214
- `classes`: For now, only works with "defaultProps".
215-
- `functions`: "Please help documentation". "defaultArguments" is recommended. We will change it to deafult later. Defaults to "defaultProps".
215+
- `functions`: optional string that this rule determines strategy for the function. "defaultArguments" is recommended. We will change it to deafult later. Defaults to "defaultProps".
216216
- `ignoreFunctionalComponents`: optional boolean to ignore this rule for functional components. Defaults to false. Deprecated, use `functions` instead.
217217

218218
### `forbidDefaultForRequired`
@@ -291,7 +291,11 @@ MyStatelessComponent.propTypes = {
291291

292292
### `functions`
293293

294-
"Please help documentation." "defaultArguments" is recommended. We will change it to deafult later.
294+
- "defaultProps": Use `.defaultProps`.
295+
- "defaultArguments": Use object default arguments
296+
- "ignore": Ignore this rule for functional components.
297+
298+
"defaultArguments" is recommended. We will change it to deafult later.
295299

296300
Examples of **incorrect** code for this rule:
297301

0 commit comments

Comments
 (0)