Run prettier across codebase

Close #1444
This commit is contained in:
Nicolas Gallagher
2019-10-07 14:26:16 -07:00
parent d4b9f35d33
commit 1b3c31ff6a
10 changed files with 31 additions and 13 deletions
@@ -45,7 +45,7 @@ class SierpinskiTriangle extends React.Component {
}
// introduce randomness to ensure that repeated runs don't produce the same colors
const color = fn(renderCount * Math.random() / 20);
const color = fn((renderCount * Math.random()) / 20);
return (
<Dot color={color} size={targetSize} x={x - targetSize / 2} y={y - targetSize / 2} />
);
+1 -1
View File
@@ -21,7 +21,7 @@ class Tree extends Component {
let result = (
<Box color={id % 3} layout={depth % 2 === 0 ? 'column' : 'row'} outer>
{depth === 0 && <Box color={id % 3 + 3} fixed />}
{depth === 0 && <Box color={(id % 3) + 3} fixed />}
{depth !== 0 &&
Array.from({ length: breadth }).map((el, i) => (
<Tree
@@ -12,7 +12,15 @@ const compose = (s1, s2) => {
class View extends React.Component {
render() {
const { style, ...other } = this.props;
return <div {...other} style={compose(viewStyle, style)} />;
return (
<div
{...other}
style={compose(
viewStyle,
style
)}
/>
);
}
}