Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnamedComponents option examples in function-component-definition documentation #2608

Merged
merged 1 commit into from Mar 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/rules/function-component-definition.md
Expand Up @@ -86,7 +86,7 @@ function getComponent () {
// only arrow functions for unnamed components
// [2, { "unnamedComponents": "arrow-function" }]
function getComponent () {
return (props) => {
return function (props) {
return <div />;
};
}
Expand Down Expand Up @@ -118,7 +118,7 @@ var Component = (props) => {
// only function expressions for unnamed components
// [2, { "unnamedComponents": "function-expression" }]
function getComponent () {
return (props) => {
return function (props) {
return <div />;
};
}
Expand Down Expand Up @@ -251,4 +251,4 @@ function getComponent() {

## When not to use

If you are not interested in consistent types of function components.
If you are not interested in consistent types of function components.