Skip to content

Commit b9b1bee

Browse files
mrdulinljharb
authored andcommitted
[Docs] no-unused-prop-types: fix syntax errors
1 parent 8513f1a commit b9b1bee

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1717
### Changed
1818
* [readme] remove global usage and eslint version from readme ([#3254][] @aladdin-add)
1919
* [Refactor] fix linter errors ([#3261][] @golopot)
20+
* [Docs] [`no-unused-prop-types`]: fix syntax errors ([#3259][] @mrdulin)
2021

2122
[#3261]: https://github.com/yannickcr/eslint-plugin-react/pull/3261
2223
[#3260]: https://github.com/yannickcr/eslint-plugin-react/pull/3260
24+
[#3259]: https://github.com/yannickcr/eslint-plugin-react/pull/3259
2325
[#3254]: https://github.com/yannickcr/eslint-plugin-react/pull/3254
2426
[#3251]: https://github.com/yannickcr/eslint-plugin-react/pull/3251
2527
[#3244]: https://github.com/yannickcr/eslint-plugin-react/pull/3244

docs/rules/no-unused-prop-types.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ class Hello extends React.Component {
1515
render() {
1616
return <div>Hello Bob</div>;
1717
}
18-
});
18+
}
1919

2020
Hello.propTypes = {
2121
name: PropTypes.string
22-
},
22+
};
2323
```
2424

2525
```jsx
2626
type Props = {
27-
firstname: string,
28-
middlename: string, // middlename is never used by the Hello component
29-
lastname: string
27+
firstname: string;
28+
middlename: string; // middlename is never used by the Hello component
29+
lastname: string;
3030
}
3131

3232
class Hello extends React.Component<Props> {
@@ -62,11 +62,11 @@ class Hello extends React.Component {
6262
render() {
6363
return <div>Hello {this.props.name}</div>;
6464
}
65-
};
65+
}
6666

67-
Hello.propTypes: {
67+
Hello.propTypes = {
6868
name: PropTypes.string
69-
},
69+
};
7070
```
7171

7272
## Rule Options

0 commit comments

Comments
 (0)