Skip to content

Commit

Permalink
Upgrade Prettier to v1.12.1 on fbsource
Browse files Browse the repository at this point in the history
Reviewed By: benjaffe, ryanmce, yungsters

Differential Revision: D7652946

fbshipit-source-id: 396d45c675e93f2298cd2920d927630c81867447
  • Loading branch information
Peter van der Zee authored and facebook-github-bot committed Apr 19, 2018
1 parent 7e82486 commit 3c0b892
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
16 changes: 10 additions & 6 deletions Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ var Image = createReactClass({
*/
blurRadius: PropTypes.number,
/**
* See https://facebook.github.io/react-native/docs/image.html#defaultsource
*/
* See https://facebook.github.io/react-native/docs/image.html#defaultsource
*/
defaultSource: PropTypes.number,
/**
* See https://facebook.github.io/react-native/docs/image.html#loadingindicatorsource
Expand Down Expand Up @@ -123,7 +123,13 @@ var Image = createReactClass({
*
* See https://facebook.github.io/react-native/docs/image.html#resizemode
*/
resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']),
resizeMode: PropTypes.oneOf([
'cover',
'contain',
'stretch',
'repeat',
'center',
]),
},

statics: {
Expand Down Expand Up @@ -254,9 +260,7 @@ var Image = createReactClass({
),
src: sources,
headers: source.headers,
defaultSrc: defaultSource
? defaultSource.uri
: null,
defaultSrc: defaultSource ? defaultSource.uri : null,
loadingIndicatorSrc: loadingIndicatorSource
? loadingIndicatorSource.uri
: null,
Expand Down
8 changes: 5 additions & 3 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,14 +852,14 @@ class VirtualizedList extends React.PureComponent<Props, State> {
);
}
} else if (ListEmptyComponent) {
const element: React.Element<any> = (React.isValidElement(
const element: React.Element<any> = ((React.isValidElement(
ListEmptyComponent,
) ? (
ListEmptyComponent
) : (
// $FlowFixMe
<ListEmptyComponent />
): any);
)): any);
cells.push(
React.cloneElement(element, {
key: '$empty',
Expand Down Expand Up @@ -1670,7 +1670,9 @@ class CellRenderer extends React.Component<
? horizontal
? [{flexDirection: 'row-reverse'}, inversionStyle]
: [{flexDirection: 'column-reverse'}, inversionStyle]
: horizontal ? [{flexDirection: 'row'}, inversionStyle] : inversionStyle;
: horizontal
? [{flexDirection: 'row'}, inversionStyle]
: inversionStyle;
if (!CellRendererComponent) {
return (
<View style={cellStyle} onLayout={onLayout}>
Expand Down
10 changes: 6 additions & 4 deletions Libraries/StyleSheet/StyleSheetTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ export type ____TransformStyle_Internal = $ReadOnly<{|
| {|+translateX: number | AnimatedNode|}
| {|+translateY: number | AnimatedNode|}
| {|
+translate: [number | AnimatedNode, number | AnimatedNode] | AnimatedNode,
|}
+translate:
| [number | AnimatedNode, number | AnimatedNode]
| AnimatedNode,
|}
| {|+skewX: string|}
| {|+skewY: string|}
// TODO: what is the actual type it expects?
| {|
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|},
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|},
>,
|}>;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"flow-bin": "^0.70.0",
"jest": "23.0.0-alpha.4",
"jest-junit": "3.6.0",
"prettier": "1.9.1",
"prettier": "1.12.1",
"react": "16.3.2",
"react-test-renderer": "16.3.2",
"shelljs": "^0.7.8",
Expand Down

0 comments on commit 3c0b892

Please sign in to comment.