diff --git a/.eslintrc b/.eslintrc index 2498cd7241812..1994a45550899 100644 --- a/.eslintrc +++ b/.eslintrc @@ -93,7 +93,7 @@ rules: react/self-closing-comp: 2 # We don't care to do this react/sort-comp: 0 - #react/wrap-multilines: 2 + react/wrap-multilines: [2, {declaration: false, assignment: false}] # CUSTOM RULES # the second argument of warning/invariant should be a literal string diff --git a/package.json b/package.json index f13477a90ef5b..e3bb32f1b59c8 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "envify": "^3.0.0", "es5-shim": "^4.0.0", "eslint": "^0.21.2", - "eslint-plugin-react": "^2.3.0", + "eslint-plugin-react": "^2.5.0", "eslint-tester": "^0.7.0", "grunt": "~0.4.2", "grunt-cli": "^0.1.13", diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js index e5b90f3a49e25..d08a9f61bfc4d 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js @@ -429,10 +429,12 @@ describe('ReactCompositeComponent', function() { var Component = React.createClass({ render: function() { - return
- - Text -
; + return ( +
+ + Text +
+ ); }, }); var Inner = React.createClass({ @@ -774,15 +776,19 @@ describe('ReactCompositeComponent', function() { var Component = React.createClass({ render: function() { if (this.props.flipped) { - return
- B (ignored) - A (ignored) -
; + return ( +
+ B (ignored) + A (ignored) +
+ ); } else { - return
- A - B -
; + return ( +
+ A + B +
+ ); } }, }); diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js index ebb62f1b9f007..f50294687256b 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js @@ -38,11 +38,13 @@ describe('ReactCompositeComponentNestedState-state', function() { render: function() { this.props.logger('parent-render', this.state.color); - return ; + return ( + + ); }, }); @@ -66,20 +68,22 @@ describe('ReactCompositeComponentNestedState-state', function() { render: function() { this.props.logger('render', this.state.hue, this.props.color); - return
- - - - -
; + return ( +
+ + + + +
+ ); }, }); diff --git a/src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js b/src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js index e55432533fff0..5159a7cb0f938 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js @@ -675,9 +675,11 @@ describe('ReactUpdates', function() { }, render: function() { if (this.state.s === 0) { - return
- 0 -
; + return ( +
+ 0 +
+ ); } else { return
1
; } @@ -691,9 +693,11 @@ describe('ReactUpdates', function() { var Y = React.createClass({ render: function() { - return
- -
; + return ( +
+ +
+ ); }, });