Skip to content

Commit

Permalink
[Docs]: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nix6839 committed Apr 29, 2022
1 parent ee00db7 commit 6a3b363
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/rules/default-props-match-prop-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ MyStatelessComponent.propTypes = {
};

MyStatelessComponent.defaultProps = {
bar: 'some default'
bar: 'some default'
};
```

Expand Down Expand Up @@ -193,6 +193,7 @@ If you don't care about stray `defaultsProps` in your components, you can disabl
- [require-default-props](./require-default-props.md)

# Resources

- [Official React documentation on defaultProps](https://facebook.github.io/react/docs/typechecking-with-proptypes.html#default-prop-values)

[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
Expand Down
5 changes: 5 additions & 0 deletions docs/rules/sort-prop-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var Component = createReactClass({
...
});
```

```jsx
type Props = {
z: number,
Expand All @@ -28,6 +29,7 @@ class Component extends React.Component<Props> {
...
}
```

```jsx
class Component extends React.Component {
static propTypes = {
Expand All @@ -53,6 +55,7 @@ var Component = createReactClass({
...
});
```

```jsx
type Props = {
a: string,
Expand All @@ -63,6 +66,7 @@ class Component extends React.Component<Props> {
...
}
```

```jsx
class Component extends React.Component {
static propTypes = {
Expand Down Expand Up @@ -144,6 +148,7 @@ var Component = createReactClass({
...
});
```

### `noSortAlphabetically`

When `true`, alphabetical order is not enforced:
Expand Down

0 comments on commit 6a3b363

Please sign in to comment.