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
passionSeven committed Feb 4, 2016
1 parent 6e499cc commit c497dd2
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 c497dd2

Please sign in to comment.