Bump Prettier to 1.13.4 on xplat

Summary:
Bump Prettier to use version 1.13.4
All code changes are caused by running Prettier and should only affect files that have an `format` header.
All other changes caused by yarn.

Reviewed By: ryanmce

Differential Revision: D8251255

fbshipit-source-id: 0b4445c35f1269d72730f2000002a27c1bc35914
This commit is contained in:
Peter van der Zee
2018-06-06 05:20:40 -07:00
committed by Facebook Github Bot
parent 3a1d949906
commit 29fb2a8e90
37 changed files with 88 additions and 55 deletions

View File

@@ -121,8 +121,9 @@ class SimpleAlertExampleBlock extends React.Component {
class AlertExample extends React.Component {
static title = 'Alert';
static description = 'Alerts display a concise and informative message ' +
'and prompt the user to make a decision.';
static description =
'Alerts display a concise and informative message ' +
'and prompt the user to make a decision.';
render() {
return (

View File

@@ -193,8 +193,9 @@ class Circle extends React.Component<any, any> {
class AnExApp extends React.Component<any, any> {
static title = 'Animated - Gratuitous App';
static description = 'Bunch of Animations - tap a circle to ' +
'open a view with more animations, or longPress and drag to reorder circles.';
static description =
'Bunch of Animations - tap a circle to ' +
'open a view with more animations, or longPress and drag to reorder circles.';
_onMove: (position: Point) => void;
constructor(props: any): void {

View File

@@ -20,7 +20,7 @@ class DatePickerExample extends React.Component<
> {
static defaultProps = {
date: new Date(),
timeZoneOffsetInHours: -1 * new Date().getTimezoneOffset() / 60,
timeZoneOffsetInHours: (-1 * new Date().getTimezoneOffset()) / 60,
};
state = {

View File

@@ -158,7 +158,7 @@ var NetworkImageExample = createReactClass({
onProgress={e =>
this.setState({
progress: Math.round(
100 * e.nativeEvent.loaded / e.nativeEvent.total,
(100 * e.nativeEvent.loaded) / e.nativeEvent.total,
),
})
}

View File

@@ -60,7 +60,8 @@ class TextInputBar extends React.PureComponent<*, *> {
class InputAccessoryViewExample extends React.Component<*> {
static title = '<InputAccessoryView>';
static description = 'Example showing how to use an InputAccessoryView to build an iMessage-like sticky text input';
static description =
'Example showing how to use an InputAccessoryView to build an iMessage-like sticky text input';
render() {
return (

View File

@@ -27,7 +27,8 @@ const RNTesterPage = require('./RNTesterPage');
class KeyboardAvoidingViewExample extends React.Component {
static title = '<KeyboardAvoidingView>';
static description = 'Base component for views that automatically adjust their height or position to move out of the way of the keyboard.';
static description =
'Base component for views that automatically adjust their height or position to move out of the way of the keyboard.';
state = {
behavior: 'padding',

View File

@@ -38,7 +38,7 @@ function genItemData(count: number, start: number = 0): Array<Item> {
const itemHash = Math.abs(hashCode('Item ' + ii));
dataBlob.push({
title: 'Item ' + ii,
text: LOREM_IPSUM.substr(0, itemHash % 301 + 20),
text: LOREM_IPSUM.substr(0, (itemHash % 301) + 20),
key: String(ii),
pressed: false,
});

View File

@@ -70,7 +70,7 @@ var ListViewSimpleExample = createReactClass({
<View style={styles.row}>
<Image style={styles.thumb} source={imgSource} />
<Text style={styles.text}>
{rowData + ' - ' + LOREM_IPSUM.substr(0, rowHash % 301 + 10)}
{rowData + ' - ' + LOREM_IPSUM.substr(0, (rowHash % 301) + 10)}
</Text>
</View>
</View>

View File

@@ -24,7 +24,8 @@ const {
class MaskedViewExample extends React.Component<{}, $FlowFixMeState> {
static title = '<MaskedViewIOS>';
static description = 'Renders the child view with a mask specified in the `renderMask` prop.';
static description =
'Renders the child view with a mask specified in the `renderMask` prop.';
state = {
alternateChildren: true,

View File

@@ -22,7 +22,8 @@ const Item = Picker.Item;
class PickerExample extends React.Component<{}, $FlowFixMeState> {
static title = '<Picker>';
static description = 'Provides multiple options to choose from, using either a dropdown menu or a dialog.';
static description =
'Provides multiple options to choose from, using either a dropdown menu or a dialog.';
state = {
selected1: 'key1',

View File

@@ -373,7 +373,8 @@ const BorderExample = withRTLState(({isRTL, setRTL}) => {
class RTLExample extends React.Component<any, State> {
static title = 'RTLExample';
static description = 'Examples to show how to apply components to RTL layout.';
static description =
'Examples to show how to apply components to RTL layout.';
_panResponder: Object;

View File

@@ -18,7 +18,8 @@ var NUM_ITEMS = 20;
class ScrollViewSimpleExample extends React.Component<{}> {
static title = '<ScrollView>';
static description = 'Component that enables scrolling through child components.';
static description =
'Component that enables scrolling through child components.';
makeItems = (nItems: number, styles): Array<any> => {
var items = [];

View File

@@ -94,7 +94,7 @@ var SwipeableListViewSimpleExample = createReactClass({
<View style={styles.row}>
<Image style={styles.thumb} source={imgSource} />
<Text style={styles.text}>
{rowData.id + ' - ' + LOREM_IPSUM.substr(0, rowHash % 301 + 10)}
{rowData.id + ' - ' + LOREM_IPSUM.substr(0, (rowHash % 301) + 10)}
</Text>
</View>
</View>

View File

@@ -19,7 +19,8 @@ var RNTesterPage = require('RNTesterPage');
class ToastExample extends React.Component<{}, $FlowFixMeState> {
static title = 'Toast Example';
static description = 'Example that demonstrates the use of an Android Toast to provide feedback.';
static description =
'Example that demonstrates the use of an Android Toast to provide feedback.';
state = {};
render() {

View File

@@ -81,7 +81,7 @@ class ProgressBar extends React.Component {
render() {
var fractionalPosition =
this.props.progress.position + this.props.progress.offset;
var progressBarSize = fractionalPosition / (PAGES - 1) * this.props.size;
var progressBarSize = (fractionalPosition / (PAGES - 1)) * this.props.size;
return (
<View style={[styles.progressBarContainer, {width: this.props.size}]}>
<View style={[styles.progressBar, {width: progressBarSize}]} />
@@ -92,7 +92,8 @@ class ProgressBar extends React.Component {
class ViewPagerAndroidExample extends React.Component {
static title = '<ViewPagerAndroid>';
static description = 'Container that allows to flip left and right between child views.';
static description =
'Container that allows to flip left and right between child views.';
state = {
page: 0,