Skip to content

Commit

Permalink
Sort static methods above constructor for React
Browse files Browse the repository at this point in the history
I think it makes more sense to put static methods above the constructor
in classes. I would like to update the ESLint configuration to match
this, but it looks like the react/sort-comp rule does not support it
quite yet.

  jsx-eslint/eslint-plugin-react#128
  • Loading branch information
lencioni authored and jaylaw81 committed Sep 19, 2017
1 parent dc45a6e commit 13e9072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@

- Ordering for `class extends React.Component`:

1. `constructor`
1. optional `static` methods
1. `constructor`
1. `getChildContext`
1. `componentWillMount`
1. `componentDidMount`
Expand Down

0 comments on commit 13e9072

Please sign in to comment.