From 60cc2fe911016b297dddfdd079adaaf0174f08bc Mon Sep 17 00:00:00 2001 From: Alex Jacobs Date: Sat, 28 May 2016 14:04:32 -0700 Subject: [PATCH] Fix minor lint warnings (#6909) (cherry picked from commit 29ed7c6c8c2dd0546c453322d7549954b8bf6df0) --- .../client/syntheticEvents/SyntheticEvent.js | 18 +++++++++++++++--- .../native/ReactNativeAttributePayload.js | 4 +++- .../shared/fiber/isomorphic/ReactCoroutine.js | 7 ++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js index 967c52a494..bf34459953 100644 --- a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js +++ b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js @@ -173,9 +173,21 @@ Object.assign(SyntheticEvent.prototype, { this[shouldBeReleasedProperties[i]] = null; } if (__DEV__) { - Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); - Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); - Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null) + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', emptyFunction) + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', emptyFunction) + ); } }, diff --git a/src/renderers/native/ReactNativeAttributePayload.js b/src/renderers/native/ReactNativeAttributePayload.js index 4aaa806449..54912f3546 100644 --- a/src/renderers/native/ReactNativeAttributePayload.js +++ b/src/renderers/native/ReactNativeAttributePayload.js @@ -394,7 +394,9 @@ function diffProperties( // default: fallthrough case when nested properties are defined removedKeys = null; removedKeyCount = 0; - // $FlowFixMe - We think that attributeConfig is not CustomAttributeConfiguration at this point so we assume it must be AttributeConfiguration. + // $FlowFixMe - We think that attributeConfig is not + // CustomAttributeConfiguration at this point so we assume + // it must be AttributeConfiguration. updatePayload = diffNestedProperty( updatePayload, prevProp, diff --git a/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js b/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js index a03934ea56..36728c4596 100644 --- a/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js +++ b/src/renderers/shared/fiber/isomorphic/ReactCoroutine.js @@ -42,7 +42,12 @@ export type ReactYield = { continuation: mixed }; -exports.createCoroutine = function(children : mixed, handler : CoroutineHandler, props : T, key : ?string = null) : ReactCoroutine { +exports.createCoroutine = function( + children : mixed, + handler : CoroutineHandler, + props : T, + key : ?string = null +) : ReactCoroutine { var coroutine = { // This tag allow us to uniquely identify this as a React Coroutine $$typeof: REACT_COROUTINE_TYPE,