Skip to content

πŸ“Ž Port function-component-definition rule from eslint react pluginΒ #10320

@gameroman

Description

@gameroman

Description

❌ Incorrect:

const MyComponent = (props) => {
  return <div>{props.name}</div>;
};

βœ… Correct:

function MyComponent(props) {
  return <div>{props.name}</div>;
}

https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinterArea: linterD-ReactDomain: ReactL-JavaScriptLanguage: JavaScript and super languagesS-Good first issueStatus: Good for newcomersS-Help-wantedStatus: you're familiar with the code base and want to help the project

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions