Sort static methods above constructor for React

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.

  https://github.com/yannickcr/eslint-plugin-react/issues/128
This commit is contained in:
Joe Lencioni
2016-02-04 11:01:17 -08:00
parent 24e7fd0c14
commit e007ec5be9

View File

@@ -334,8 +334,8 @@
- Ordering for `class extends React.Component`:
1. `constructor`
1. optional `static` methods
1. `constructor`
1. `getChildContext`
1. `componentWillMount`
1. `componentDidMount`