From 3c0b8922e2c45760cd5635f4402563ae95ac5628 Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Thu, 19 Apr 2018 02:30:39 -0700 Subject: [PATCH] Upgrade Prettier to v1.12.1 on fbsource Reviewed By: benjaffe, ryanmce, yungsters Differential Revision: D7652946 fbshipit-source-id: 396d45c675e93f2298cd2920d927630c81867447 --- Libraries/Image/Image.android.js | 16 ++++++++++------ Libraries/Lists/VirtualizedList.js | 8 +++++--- Libraries/StyleSheet/StyleSheetTypes.js | 10 ++++++---- package.json | 2 +- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 870b31cd8f92cb..4c8fa6e7fd173d 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -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 @@ -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: { @@ -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, diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 2b1b83ff41bb0b..30e8777eaee43d 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -852,14 +852,14 @@ class VirtualizedList extends React.PureComponent { ); } } else if (ListEmptyComponent) { - const element: React.Element = (React.isValidElement( + const element: React.Element = ((React.isValidElement( ListEmptyComponent, ) ? ( ListEmptyComponent ) : ( // $FlowFixMe - ): any); + )): any); cells.push( React.cloneElement(element, { key: '$empty', @@ -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 ( diff --git a/Libraries/StyleSheet/StyleSheetTypes.js b/Libraries/StyleSheet/StyleSheetTypes.js index ffec5b54bc7937..a176ca1e810785 100644 --- a/Libraries/StyleSheet/StyleSheetTypes.js +++ b/Libraries/StyleSheet/StyleSheetTypes.js @@ -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 | AnimatedNode, - |}, + +matrix: $ReadOnlyArray | AnimatedNode, + |}, >, |}>; diff --git a/package.json b/package.json index c28da3b6dc120f..8cadfda93457f0 100644 --- a/package.json +++ b/package.json @@ -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",