From e9b59b76a5287a4aed3df94ed8b06ff0ad5fbd35 Mon Sep 17 00:00:00 2001 From: Chris Portela Date: Wed, 24 Jun 2015 15:51:25 -0400 Subject: [PATCH 1/2] Update .eslintrc with other react class properties In `eslint-plugin-react`'s page on their sorting rules they show the order I showed here. https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md#rule-options I noticed because according to the current rules `contextTypes` goes below `render` and I also noticed other methods were missing from the list. Since we're being specific we should also include the other methods and properties that `eslint-plugin-react` handles by default. --- linters/.eslintrc | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/linters/.eslintrc b/linters/.eslintrc index 93b84a54..c99a626e 100644 --- a/linters/.eslintrc +++ b/linters/.eslintrc @@ -190,18 +190,23 @@ "react/wrap-multilines": 2, "react/sort-comp": [2, { "order": [ - "displayName", - "mixins", - "statics", - "propTypes", - "getDefaultProps", - "getInitialState", - "componentWillMount", - "componentDidMount", - "componentWillReceiveProps", - "shouldComponentUpdate", - "componentWillUpdate", - "componentWillUnmount", + 'displayName', + 'propTypes', + 'contextTypes', + 'childContextTypes', + 'mixins', + 'statics', + 'defaultProps', + 'getDefaultProps', + 'getInitialState', + 'getChildContext', + 'componentWillMount', + 'componentDidMount', + 'componentWillReceiveProps', + 'shouldComponentUpdate', + 'componentWillUpdate', + 'componentDidUpdate', + 'componentWillUnmount', "/^on.+$/", "/^get.+$/", "/^render.+$/", From fe42d0bfa3290efbeb3360e0f0b1e8c69c3ca3fd Mon Sep 17 00:00:00 2001 From: Chris Portela Date: Wed, 24 Jun 2015 16:02:21 -0400 Subject: [PATCH 2/2] Made single quotes to double quotes --- linters/.eslintrc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/linters/.eslintrc b/linters/.eslintrc index c99a626e..b904f3ec 100644 --- a/linters/.eslintrc +++ b/linters/.eslintrc @@ -190,23 +190,23 @@ "react/wrap-multilines": 2, "react/sort-comp": [2, { "order": [ - 'displayName', - 'propTypes', - 'contextTypes', - 'childContextTypes', - 'mixins', - 'statics', - 'defaultProps', - 'getDefaultProps', - 'getInitialState', - 'getChildContext', - 'componentWillMount', - 'componentDidMount', - 'componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'componentDidUpdate', - 'componentWillUnmount', + "displayName", + "propTypes", + "contextTypes", + "childContextTypes", + "mixins", + "statics", + "defaultProps", + "getDefaultProps", + "getInitialState", + "getChildContext", + "componentWillMount", + "componentDidMount", + "componentWillReceiveProps", + "shouldComponentUpdate", + "componentWillUpdate", + "componentDidUpdate", + "componentWillUnmount", "/^on.+$/", "/^get.+$/", "/^render.+$/",