From 739baa90927d06e7e2267c65b1221931a20784a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Mon, 8 Dec 2014 12:06:38 -0800 Subject: [PATCH] Fix new lint errors We'll get to lint parity soon and then not need to do this. --- src/browser/ui/React.js | 2 ++ src/browser/ui/ReactMount.js | 2 +- src/core/ReactCompositeComponent.js | 4 ++-- src/core/__tests__/ReactCompositeComponent-test.js | 2 +- src/test/ReactTestUtils.js | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/browser/ui/React.js b/src/browser/ui/React.js index ad062cba4c318..e5e9921b04362 100644 --- a/src/browser/ui/React.js +++ b/src/browser/ui/React.js @@ -9,6 +9,8 @@ * @providesModule React */ +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + "use strict"; var DOMPropertyOperations = require('DOMPropertyOperations'); diff --git a/src/browser/ui/ReactMount.js b/src/browser/ui/ReactMount.js index fd8036d540050..18c9c72684d15 100644 --- a/src/browser/ui/ReactMount.js +++ b/src/browser/ui/ReactMount.js @@ -764,7 +764,7 @@ var ReactMount = { 'methods are impure. React cannot handle this case due to ' + 'cross-browser quirks by rendering at the document root. You ' + 'should look for environment dependent code in your components ' + - 'and ensure the props are the same client and server side:\n' + + 'and ensure the props are the same client and server side:\n%s', difference ); diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index c3d880ce7135d..f71de95c92b63 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -611,8 +611,8 @@ var ReactCompositeComponentMixin = assign({}, displayName ); } else { - for (key in parentKeys) { - var key = parentKeys[key]; + for (var i = 0; i < parentKeys.length; i++) { + var key = parentKeys[i]; warning( ownerBasedContext[key] === parentBasedContext[key], 'owner-based and parent-based contexts differ ' + diff --git a/src/core/__tests__/ReactCompositeComponent-test.js b/src/core/__tests__/ReactCompositeComponent-test.js index b60fd0d94aff0..299a5ccf5c4ab 100644 --- a/src/core/__tests__/ReactCompositeComponent-test.js +++ b/src/core/__tests__/ReactCompositeComponent-test.js @@ -1060,7 +1060,7 @@ describe('ReactCompositeComponent', function() { }); var component = React.withContext({foo: 'noise'}, function() { - return + return ; }); ReactTestUtils.renderIntoDocument({component}); diff --git a/src/test/ReactTestUtils.js b/src/test/ReactTestUtils.js index fec6709b538e3..f2f99d5b52a67 100644 --- a/src/test/ReactTestUtils.js +++ b/src/test/ReactTestUtils.js @@ -321,7 +321,7 @@ ReactShallowRenderer.prototype.getRenderOutput = function() { var ShallowComponentWrapper = function(inst) { this._instance = inst; -} +}; assign( ShallowComponentWrapper.prototype, ReactCompositeComponent.ShallowMixin