Skip to content

Commit

Permalink
Fixed all eslint warnings (#7230)
Browse files Browse the repository at this point in the history
(cherry picked from commit c52a2b9)
  • Loading branch information
usmanajmal authored and zpao committed Jul 13, 2016
1 parent d40393f commit 9f97529
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/renderers/dom/fiber/ReactDOMFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ var DOMRenderer = ReactFiberReconciler({
return domElement;
},

prepareUpdate(domElement : Instance, oldProps : Props, newProps : Props, children : HostChildren<Instance>) : boolean {
prepareUpdate(
domElement : Instance,
oldProps : Props,
newProps : Props,
children : HostChildren<Instance>
) : boolean {
return true;
},

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/native/NativeMethodsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,6 @@ function mountSafeCallback(
}
return callback.apply(context, arguments);
};
};
}

module.exports = NativeMethodsMixin;
5 changes: 4 additions & 1 deletion src/renderers/noop/ReactNoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ var ReactNoop = {
}

function logFiber(fiber : Fiber, depth) {
console.log(' '.repeat(depth) + '- ' + (fiber.type ? fiber.type.name || fiber.type : '[root]'), '[' + fiber.pendingWorkPriority + (fiber.pendingProps ? '*' : '') + ']');
console.log(
' '.repeat(depth) + '- ' + (fiber.type ? fiber.type.name || fiber.type : '[root]'),
'[' + fiber.pendingWorkPriority + (fiber.pendingProps ? '*' : '') + ']'
);
if (fiber.child) {
logFiber(fiber.child, depth + 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1848,5 +1848,5 @@ describe('ReactComponentTreeDevtool', () => {
}
ReactDOM.render(<Foo />, el);
});
})
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('ReactHostOperationHistoryDevtool', () => {

afterEach(() => {
ReactPerf.stop();
})
});

function assertHistoryMatches(expectedHistory) {
var actualHistory = ReactHostOperationHistoryDevtool.getHistory();
Expand Down
15 changes: 13 additions & 2 deletions src/renderers/shared/fiber/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ var {
var ReactFiber = require('ReactFiber');
var ReactReifiedYield = require('ReactReifiedYield');

function createSubsequentChild(returnFiber : Fiber, existingChild : ?Fiber, previousSibling : Fiber, newChildren, priority : PriorityLevel) : Fiber {
function createSubsequentChild(
returnFiber : Fiber,
existingChild : ?Fiber,
previousSibling : Fiber,
newChildren,
priority : PriorityLevel
) : Fiber {
if (typeof newChildren !== 'object' || newChildren === null) {
return previousSibling;
}
Expand Down Expand Up @@ -163,6 +169,11 @@ function createFirstChild(returnFiber, existingChild, newChildren, priority) {

// TODO: This API won't work because we'll need to transfer the side-effects of
// unmounting children to the returnFiber.
exports.reconcileChildFibers = function(returnFiber : Fiber, currentFirstChild : ?Fiber, newChildren : ReactNodeList, priority : PriorityLevel) : ?Fiber {
exports.reconcileChildFibers = function(
returnFiber : Fiber,
currentFirstChild : ?Fiber,
newChildren : ReactNodeList,
priority : PriorityLevel
) : ?Fiber {
return createFirstChild(returnFiber, currentFirstChild, newChildren, priority);
};
5 changes: 4 additions & 1 deletion src/renderers/shared/fiber/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>) {
}

function updateHostComponent(current, workInProgress) {
console.log('host component', workInProgress.type, typeof workInProgress.pendingProps.children === 'string' ? workInProgress.pendingProps.children : '');
console.log(
'host component', workInProgress.type,
typeof workInProgress.pendingProps.children === 'string' ? workInProgress.pendingProps.children : ''
);

var nextChildren = workInProgress.pendingProps.children;

Expand Down

0 comments on commit 9f97529

Please sign in to comment.