@samitouri / QOS-React-2 / commits / 6fec6507ed

Fix lint errors (#8113)

Ivan Zotov committed Oct 27, 2016 at 15:03 UTC 6fec6507ed7d316551ad78975d5037f1138b6f9c
3 files changed +25 -8
src/renderers/dom/fiber/ReactDOMFiber.js
+5 -1
@@ -96,7 +96,11 @@ var DOMRenderer = ReactFiberReconciler({
96 parentInstance.appendChild(child);
97 },
98
99 - insertBefore(parentInstance : Instance, child : Instance | TextInstance, beforeChild : Instance | TextInstance) : void {
99 + insertBefore(
100 + parentInstance : Instance,
101 + child : Instance | TextInstance,
102 + beforeChild : Instance | TextInstance
103 + ) : void {
104 parentInstance.insertBefore(child, beforeChild);
105 },
106
src/renderers/noop/ReactNoop.js
+9 -2
@@ -41,7 +41,10 @@ type TextInstance = { tag: 98, text: string };
41
42 var instanceCounter = 0;
43
44 -function recursivelyAppendChildren(flatArray : Array<Instance | TextInstance>, child : HostChildren<Instance | TextInstance>) {
44 +function recursivelyAppendChildren(
45 + flatArray : Array<Instance | TextInstance>,
46 + child : HostChildren<Instance | TextInstance>
47 +) {
48 if (!child) {
49 return;
50 }
@@ -108,7 +111,11 @@ var NoopRenderer = ReactFiberReconciler({
111 parentInstance.children.push(child);
112 },
113
111 - insertBefore(parentInstance : Instance, child : Instance | TextInstance, beforeChild : Instance | TextInstance) : void {
114 + insertBefore(
115 + parentInstance : Instance,
116 + child : Instance | TextInstance,
117 + beforeChild : Instance | TextInstance
118 + ) : void {
119 const index = parentInstance.children.indexOf(child);
120 if (index !== -1) {
121 parentInstance.children.splice(index, 1);
src/renderers/shared/fiber/ReactFiberBeginWork.js
+11 -5
@@ -46,7 +46,10 @@ var {
46 } = require('ReactTypeOfSideEffect');
47 var ReactFiberClassComponent = require('ReactFiberClassComponent');
48
49 -module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, scheduleUpdate : (fiber: Fiber, priorityLevel : PriorityLevel) => void) {
49 +module.exports = function<T, P, I, TI, C>(
50 + config : HostConfig<T, P, I, TI, C>,
51 + scheduleUpdate : (fiber: Fiber, priorityLevel : PriorityLevel) => void
52 +) {
53
54 const {
55 adoptClassInstance,
@@ -152,11 +155,13 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, s
155 }
156 }
157
158 + var nextChildren;
159 +
160 if (__DEV__) {
161 ReactCurrentOwner.current = workInProgress;
157 - var nextChildren = fn(props);
162 + nextChildren = fn(props);
163 } else {
159 - var nextChildren = fn(props);
164 + nextChildren = fn(props);
165 }
166 reconcileChildren(current, workInProgress, nextChildren);
167 return workInProgress.child;
@@ -244,12 +249,13 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>, s
249 }
250 var fn = workInProgress.type;
251 var props = workInProgress.pendingProps;
252 + var value;
253
254 if (__DEV__) {
255 ReactCurrentOwner.current = workInProgress;
250 - var value = fn(props);
256 + value = fn(props);
257 } else {
252 - var value = fn(props);
258 + value = fn(props);
259 }
260
261 if (typeof value === 'object' && value && typeof value.render === 'function') {