Fix minor lint warnings (#6909)

(cherry picked from commit 29ed7c6c8c)
This commit is contained in:
Alex Jacobs
2016-05-28 14:04:32 -07:00
committed by Paul O’Shannessy
parent 74ea71b324
commit 60cc2fe911
3 changed files with 24 additions and 5 deletions
@@ -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)
);
}
},
@@ -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,
@@ -42,7 +42,12 @@ export type ReactYield = {
continuation: mixed
};
exports.createCoroutine = function<T>(children : mixed, handler : CoroutineHandler<T>, props : T, key : ?string = null) : ReactCoroutine {
exports.createCoroutine = function<T>(
children : mixed,
handler : CoroutineHandler<T>,
props : T,
key : ?string = null
) : ReactCoroutine {
var coroutine = {
// This tag allow us to uniquely identify this as a React Coroutine
$$typeof: REACT_COROUTINE_TYPE,