@samitouri / QOS-React / commits / 98bab66c35

Fix lint

Andrew Clark committed Oct 18, 2018 at 18:06 UTC 98bab66c35624250eba6ed32d24c06f70a433a67
1 file changed +17 -15
packages/react-reconciler/src/ReactFiberUnwindWork.js
+17 -15
@@ -78,7 +78,7 @@ function NoopComponent() {
78 function createRootErrorUpdate(
79 fiber: Fiber,
80 errorInfo: CapturedValue<mixed>,
81 - expirationTime: ExpirationTime,
81 + expirationTime: ExpirationTime
82 ): Update<mixed> {
83 const update = createUpdate(expirationTime);
84 // Unmount the root by rendering null.
@@ -97,7 +97,7 @@ function createRootErrorUpdate(
97 function createClassErrorUpdate(
98 fiber: Fiber,
99 errorInfo: CapturedValue<mixed>,
100 - expirationTime: ExpirationTime,
100 + expirationTime: ExpirationTime
101 ): Update<mixed> {
102 const update = createUpdate(expirationTime);
103 update.tag = CaptureUpdate;
@@ -135,7 +135,7 @@ function createClassErrorUpdate(
135 fiber.expirationTime === Sync,
136 '%s: Error boundaries should implement getDerivedStateFromError(). ' +
137 'In that method, return a state update to display an error message or fallback UI.',
138 - getComponentName(fiber.type) || 'Unknown',
138 + getComponentName(fiber.type) || 'Unknown'
139 );
140 }
141 }
@@ -149,7 +149,7 @@ function throwException(
149 returnFiber: Fiber,
150 sourceFiber: Fiber,
151 value: mixed,
152 - renderExpirationTime: ExpirationTime,
152 + renderExpirationTime: ExpirationTime
153 ) {
154 // The source fiber did not complete.
155 sourceFiber.effectTag |= Incomplete;
@@ -205,9 +205,11 @@ function throwException(
205 workInProgress = returnFiber;
206 do {
207 if (workInProgress.tag === SuspenseComponent) {
208 - const fallback = workInProgress.memoizedProps.fallback;
208 const didTimeout = workInProgress.memoizedState;
210 - if (!didTimeout && workInProgress.memoizedProps.fallback !== undefined) {
209 + if (
210 + !didTimeout &&
211 + workInProgress.memoizedProps.fallback !== undefined
212 + ) {
213 // Found the nearest boundary.
214
215 // If the boundary is not in concurrent mode, we should not suspend, and
@@ -223,7 +225,7 @@ function throwException(
225 root,
226 workInProgress,
227 sourceFiber,
226 - pingTime,
228 + pingTime
229 );
230 if (enableSchedulerTracing) {
231 onResolveOrReject = Schedule_tracing_wrap(onResolveOrReject);
@@ -247,7 +249,7 @@ function throwException(
249 sourceFiber.alternate,
250 sourceFiber,
251 nextChildren,
250 - renderExpirationTime,
252 + renderExpirationTime
253 );
254 sourceFiber.effectTag &= ~Incomplete;
255
@@ -296,10 +298,10 @@ function throwException(
298 // Difference.
299 const earliestExpirationTime = findEarliestOutstandingPriorityLevel(
300 root,
299 - renderExpirationTime,
301 + renderExpirationTime
302 );
303 const earliestExpirationTimeMs = expirationTimeToMs(
302 - earliestExpirationTime,
304 + earliestExpirationTime
305 );
306 startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
307 }
@@ -323,7 +325,7 @@ function throwException(
325 } while (workInProgress !== null);
326 // No boundary was found. Fallthrough to error mode.
327 value = new Error(
326 - 'An update was suspended, but no placeholder UI was provided.',
328 + 'An update was suspended, but no placeholder UI was provided.'
329 );
330 }
331
@@ -342,7 +344,7 @@ function throwException(
344 const update = createRootErrorUpdate(
345 workInProgress,
346 errorInfo,
345 - renderExpirationTime,
347 + renderExpirationTime
348 );
349 enqueueCapturedUpdate(workInProgress, update);
350 return;
@@ -366,7 +368,7 @@ function throwException(
368 const update = createClassErrorUpdate(
369 workInProgress,
370 errorInfo,
369 - renderExpirationTime,
371 + renderExpirationTime
372 );
373 enqueueCapturedUpdate(workInProgress, update);
374 return;
@@ -381,7 +383,7 @@ function throwException(
383
384 function unwindWork(
385 workInProgress: Fiber,
384 - renderExpirationTime: ExpirationTime,
386 + renderExpirationTime: ExpirationTime
387 ) {
388 switch (workInProgress.tag) {
389 case ClassComponent: {
@@ -415,7 +417,7 @@ function unwindWork(
417 invariant(
418 (effectTag & DidCapture) === NoEffect,
419 'The root failed to unmount after an error. This is likely a bug in ' +
418 - 'React. Please file an issue.',
420 + 'React. Please file an issue.'
421 );
422 workInProgress.effectTag = (effectTag & ~ShouldCapture) | DidCapture;
423 return workInProgress;