Fix lint errors (#8113)
This commit is contained in:
parent
603b7194dc
commit
6fec6507ed
|
@ -96,7 +96,11 @@ var DOMRenderer = ReactFiberReconciler({
|
||||||
parentInstance.appendChild(child);
|
parentInstance.appendChild(child);
|
||||||
},
|
},
|
||||||
|
|
||||||
insertBefore(parentInstance : Instance, child : Instance | TextInstance, beforeChild : Instance | TextInstance) : void {
|
insertBefore(
|
||||||
|
parentInstance : Instance,
|
||||||
|
child : Instance | TextInstance,
|
||||||
|
beforeChild : Instance | TextInstance
|
||||||
|
) : void {
|
||||||
parentInstance.insertBefore(child, beforeChild);
|
parentInstance.insertBefore(child, beforeChild);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,10 @@ type TextInstance = { tag: 98, text: string };
|
||||||
|
|
||||||
var instanceCounter = 0;
|
var instanceCounter = 0;
|
||||||
|
|
||||||
function recursivelyAppendChildren(flatArray : Array<Instance | TextInstance>, child : HostChildren<Instance | TextInstance>) {
|
function recursivelyAppendChildren(
|
||||||
|
flatArray : Array<Instance | TextInstance>,
|
||||||
|
child : HostChildren<Instance | TextInstance>
|
||||||
|
) {
|
||||||
if (!child) {
|
if (!child) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +111,11 @@ var NoopRenderer = ReactFiberReconciler({
|
||||||
parentInstance.children.push(child);
|
parentInstance.children.push(child);
|
||||||
},
|
},
|
||||||
|
|
||||||
insertBefore(parentInstance : Instance, child : Instance | TextInstance, beforeChild : Instance | TextInstance) : void {
|
insertBefore(
|
||||||
|
parentInstance : Instance,
|
||||||
|
child : Instance | TextInstance,
|
||||||
|
beforeChild : Instance | TextInstance
|
||||||
|
) : void {
|
||||||
const index = parentInstance.children.indexOf(child);
|
const index = parentInstance.children.indexOf(child);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
parentInstance.children.splice(index, 1);
|
parentInstance.children.splice(index, 1);
|
||||||
|
|
|
@ -46,7 +46,10 @@ var {
|
||||||
} = require('ReactTypeOfSideEffect');
|
} = require('ReactTypeOfSideEffect');
|
||||||
var ReactFiberClassComponent = require('ReactFiberClassComponent');
|
var ReactFiberClassComponent = require('ReactFiberClassComponent');
|
||||||
|
|
||||||
module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, scheduleUpdate : (fiber: Fiber, priorityLevel : PriorityLevel) => void) {
|
module.exports = function<T, P, I, TI, C>(
|
||||||
|
config : HostConfig<T, P, I, TI, C>,
|
||||||
|
scheduleUpdate : (fiber: Fiber, priorityLevel : PriorityLevel) => void
|
||||||
|
) {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
adoptClassInstance,
|
adoptClassInstance,
|
||||||
|
@ -152,11 +155,13 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var nextChildren;
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
ReactCurrentOwner.current = workInProgress;
|
ReactCurrentOwner.current = workInProgress;
|
||||||
var nextChildren = fn(props);
|
nextChildren = fn(props);
|
||||||
} else {
|
} else {
|
||||||
var nextChildren = fn(props);
|
nextChildren = fn(props);
|
||||||
}
|
}
|
||||||
reconcileChildren(current, workInProgress, nextChildren);
|
reconcileChildren(current, workInProgress, nextChildren);
|
||||||
return workInProgress.child;
|
return workInProgress.child;
|
||||||
|
@ -244,12 +249,13 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, s
|
||||||
}
|
}
|
||||||
var fn = workInProgress.type;
|
var fn = workInProgress.type;
|
||||||
var props = workInProgress.pendingProps;
|
var props = workInProgress.pendingProps;
|
||||||
|
var value;
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
ReactCurrentOwner.current = workInProgress;
|
ReactCurrentOwner.current = workInProgress;
|
||||||
var value = fn(props);
|
value = fn(props);
|
||||||
} else {
|
} else {
|
||||||
var value = fn(props);
|
value = fn(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof value === 'object' && value && typeof value.render === 'function') {
|
if (typeof value === 'object' && value && typeof value.render === 'function') {
|
||||||
|
|
Loading…
Reference in New Issue