Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Oct 31, 2022
1 parent c06bd87 commit 3dac371
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 34 deletions.
5 changes: 4 additions & 1 deletion src/__tests__/FixedSizeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,10 @@ describe('FixedSizeGrid', () => {
});

it('should allow items to be moved within the collection without causing caching problems', () => {
const keyMap = [['0:0', '0:1:', '0:2'], ['1:0', '1:1:', '1:2']];
const keyMap = [
['0:0', '0:1:', '0:2'],
['1:0', '1:1:', '1:2'],
];
const keyMapItemRenderer = jest.fn(({ index, style }) => (
<div style={style}>{keyMap[index]}</div>
));
Expand Down
4 changes: 2 additions & 2 deletions website/sandboxes/fixed-size-grid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const Cell = ({ columnIndex, rowIndex, style }) => (
? 'GridItemOdd'
: 'GridItemEven'
: rowIndex % 2
? 'GridItemOdd'
: 'GridItemEven'
? 'GridItemOdd'
: 'GridItemEven'
}
style={style}
>
Expand Down
4 changes: 2 additions & 2 deletions website/sandboxes/scrolling-to-a-grid-item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const Cell = ({ columnIndex, rowIndex, style }) => (
? 'GridItemOdd'
: 'GridItemEven'
: rowIndex % 2
? 'GridItemOdd'
: 'GridItemEven'
? 'GridItemOdd'
: 'GridItemEven'
}
style={style}
>
Expand Down
4 changes: 2 additions & 2 deletions website/sandboxes/variable-size-grid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const Cell = ({ columnIndex, rowIndex, style }) => (
? 'GridItemOdd'
: 'GridItemEven'
: rowIndex % 2
? 'GridItemOdd'
: 'GridItemEven'
? 'GridItemOdd'
: 'GridItemEven'
}
style={style}
>
Expand Down
28 changes: 15 additions & 13 deletions website/src/components/ComponentApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,21 @@ export default class ComponentApi extends Component<Props, State> {
</h2>
{propsIntro}
<dl className={styles.ComponentApiPropList}>
{props.filter(prop => showAll || prop.isRequired).map(prop => (
<Fragment key={prop.name}>
<dt className={styles.ComponentApiPropType}>
{prop.name}: {prop.type}{' '}
{prop.defaultValue !== undefined
? ` = ${prop.defaultValue}`
: null}
</dt>
<dd className={styles.ComponentApiPropDefinition}>
{prop.description}
</dd>
</Fragment>
))}
{props
.filter(prop => showAll || prop.isRequired)
.map(prop => (
<Fragment key={prop.name}>
<dt className={styles.ComponentApiPropType}>
{prop.name}: {prop.type}{' '}
{prop.defaultValue !== undefined
? ` = ${prop.defaultValue}`
: null}
</dt>
<dd className={styles.ComponentApiPropDefinition}>
{prop.description}
</dd>
</Fragment>
))}
</dl>
<h2 id="methods" className={styles.ComponentApiSubHeader}>
Methods
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/ProfiledExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class ProfiledExample extends PureComponent<Props, void> {
}
if (this._averageTimeRef.current !== null) {
this._averageTimeRef.current.textContent = `${Math.round(
this._totalActualTime / this._numCommits * 10
(this._totalActualTime / this._numCommits) * 10
) / 10}ms`;
}
}
Expand Down
6 changes: 4 additions & 2 deletions website/src/routes/api/VariableSizeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default () => (
This component has the same methods as{' '}
<Link to="/api/FixedSizeGrid#methods">
<code>FixedSizeGrid</code>
</Link>, but with the following additions:
</Link>
, but with the following additions:
</p>
}
name="VariableSizeGrid"
Expand All @@ -26,7 +27,8 @@ export default () => (
This component has the same props as{' '}
<Link to="/api/FixedSizeGrid#props">
<code>FixedSizeGrid</code>
</Link>, but with the following additions:
</Link>
, but with the following additions:
</p>
}
/>
Expand Down
6 changes: 4 additions & 2 deletions website/src/routes/api/VariableSizeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default () => (
This component has the same methods as{' '}
<Link to="/api/FixedSizeList#methods">
<code>FixedSizeList</code>
</Link>, but with the following additions:
</Link>
, but with the following additions:
</p>
}
name="VariableSizeList"
Expand All @@ -25,7 +26,8 @@ export default () => (
This component has the same props as{' '}
<Link to="/api/FixedSizeList#props">
<code>FixedSizeList</code>
</Link>, but with the following additions:
</Link>
, but with the following additions:
</p>
}
/>
Expand Down
3 changes: 2 additions & 1 deletion website/src/routes/api/areEqual.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export default () => (
Custom comparison function for{' '}
<a href="https://reactjs.org/docs/react-api.html#reactmemo">
<code>React.memo</code>
</a>. If your item renderer is a class component, use the{' '}
</a>
. If your item renderer is a class component, use the{' '}
<Link to="/api/shouldComponentUpdate">
<code>shouldComponentUpdate</code>
</Link>{' '}
Expand Down
4 changes: 2 additions & 2 deletions website/src/routes/examples/FixedSizeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Cell extends PureComponent {
? styles.GridItemOdd
: styles.GridItemEven
: rowIndex % 2
? styles.GridItemOdd
: styles.GridItemEven
? styles.GridItemOdd
: styles.GridItemEven
}
style={style}
>
Expand Down
4 changes: 2 additions & 2 deletions website/src/routes/examples/RTLLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class Cell extends PureComponent {
? styles.GridItemOdd
: styles.GridItemEven
: rowIndex % 2
? styles.GridItemOdd
: styles.GridItemEven
? styles.GridItemOdd
: styles.GridItemEven
}
style={style}
>
Expand Down
4 changes: 2 additions & 2 deletions website/src/routes/examples/ScrollToItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class GridItemRenderer extends PureComponent {
? styles.GridItemOdd
: styles.GridItemEven
: rowIndex % 2
? styles.GridItemOdd
: styles.GridItemEven
? styles.GridItemOdd
: styles.GridItemEven
}
style={style}
>
Expand Down
4 changes: 2 additions & 2 deletions website/src/routes/examples/VariableSizeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Cell extends PureComponent {
? styles.GridItemOdd
: styles.GridItemEven
: rowIndex % 2
? styles.GridItemOdd
: styles.GridItemEven
? styles.GridItemOdd
: styles.GridItemEven
}
style={style}
>
Expand Down

0 comments on commit 3dac371

Please sign in to comment.