Bump Prettier to 1.16.4

Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
This commit is contained in:
Peter van der Zee
2019-03-14 06:55:56 -07:00
committed by Facebook Github Bot
parent 03841cf08c
commit dcd4e90d9a
38 changed files with 169 additions and 176 deletions

View File

@@ -194,8 +194,8 @@ class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
{'\n\n' + this.state.messages}

View File

@@ -57,8 +57,8 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
</Text>

View File

@@ -61,8 +61,8 @@ class IntegrationTestsApp extends React.Component<{}, $FlowFixMeState> {
return (
<ScrollView>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
<this.state.test />
</ScrollView>
);

View File

@@ -1,35 +1,35 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
*/
'use strict';
const URL = require('URL').URL;
describe('URL', function() {
it('should pass Mozilla Dev Network examples', () => {
const a = new URL('/', 'https://developer.mozilla.org');
expect(a.href).toBe('https://developer.mozilla.org/');
const b = new URL('https://developer.mozilla.org');
expect(b.href).toBe('https://developer.mozilla.org/');
const c = new URL('en-US/docs', b);
expect(c.href).toBe('https://developer.mozilla.org/en-US/docs');
const d = new URL('/en-US/docs', b);
expect(d.href).toBe('https://developer.mozilla.org/en-US/docs');
const f = new URL('/en-US/docs', d);
expect(f.href).toBe('https://developer.mozilla.org/en-US/docs');
// from original test suite, but requires complex implementation
// const g = new URL(
// '/en-US/docs',
// 'https://developer.mozilla.org/fr-FR/toto',
// );
// expect(g.href).toBe('https://developer.mozilla.org/en-US/docs');
const h = new URL('/en-US/docs', a);
expect(h.href).toBe('https://developer.mozilla.org/en-US/docs');
});
});
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
*/
'use strict';
const URL = require('URL').URL;
describe('URL', function() {
it('should pass Mozilla Dev Network examples', () => {
const a = new URL('/', 'https://developer.mozilla.org');
expect(a.href).toBe('https://developer.mozilla.org/');
const b = new URL('https://developer.mozilla.org');
expect(b.href).toBe('https://developer.mozilla.org/');
const c = new URL('en-US/docs', b);
expect(c.href).toBe('https://developer.mozilla.org/en-US/docs');
const d = new URL('/en-US/docs', b);
expect(d.href).toBe('https://developer.mozilla.org/en-US/docs');
const f = new URL('/en-US/docs', d);
expect(f.href).toBe('https://developer.mozilla.org/en-US/docs');
// from original test suite, but requires complex implementation
// const g = new URL(
// '/en-US/docs',
// 'https://developer.mozilla.org/fr-FR/toto',
// );
// expect(g.href).toBe('https://developer.mozilla.org/en-US/docs');
const h = new URL('/en-US/docs', a);
expect(h.href).toBe('https://developer.mozilla.org/en-US/docs');
});
});

View File

@@ -105,7 +105,7 @@ const ActivityIndicator = (props: Props, forwardedRef?: any) => {
style,
)}>
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<RCTActivityIndicator {...nativeProps} />
</View>
);

View File

@@ -155,8 +155,8 @@ class DatePickerIOS extends React.Component<Props> {
props.date
? props.date.getTime()
: props.initialDate
? props.initialDate.getTime()
: undefined
? props.initialDate.getTime()
: undefined
}
locale={
props.locale != null && props.locale !== ''

View File

@@ -1007,8 +1007,8 @@ const TextInput = createReactClass({
return typeof this.props.value === 'string'
? this.props.value
: typeof this.props.defaultValue === 'string'
? this.props.defaultValue
: '';
? this.props.defaultValue
: '';
},
_setNativeRef: function(ref: any) {

View File

@@ -35,8 +35,8 @@ const extractSingleTouch = nativeEvent => {
return !hasTouches && hasChangedTouches
? changedTouches[0]
: hasTouches
? touches[0]
: nativeEvent;
? touches[0]
: nativeEvent;
};
/**

View File

@@ -190,9 +190,7 @@ async function queryCache(
return await ImageLoader.queryCache(urls);
}
declare class ImageComponentType extends ReactNative.NativeComponent<
ImagePropsType,
> {
declare class ImageComponentType extends ReactNative.NativeComponent<ImagePropsType> {
static getSize: typeof getSize;
static getSizeWithHeaders: typeof getSizeWithHeaders;
static prefetch: typeof prefetch;

View File

@@ -70,9 +70,7 @@ async function queryCache(
return await ImageViewManager.queryCache(urls);
}
declare class ImageComponentType extends ReactNative.NativeComponent<
ImagePropsType,
> {
declare class ImageComponentType extends ReactNative.NativeComponent<ImagePropsType> {
static getSize: typeof getSize;
static getSizeWithHeaders: typeof getSizeWithHeaders;
static prefetch: typeof prefetch;

View File

@@ -48,10 +48,10 @@ const TouchHistoryMath = {
ofCurrent && isXAxis
? oneTouchData.currentPageX
: ofCurrent && !isXAxis
? oneTouchData.currentPageY
: !ofCurrent && isXAxis
? oneTouchData.previousPageX
: oneTouchData.previousPageY;
? oneTouchData.currentPageY
: !ofCurrent && isXAxis
? oneTouchData.previousPageX
: oneTouchData.previousPageY;
count = 1;
}
} else {

View File

@@ -82,12 +82,12 @@ class Linking extends NativeEventEmitter {
}
/*
* Launch an Android intent with extras (optional)
*
* @platform android
*
* See https://facebook.github.io/react-native/docs/linking.html#sendintent
*/
* Launch an Android intent with extras (optional)
*
* @platform android
*
* See https://facebook.github.io/react-native/docs/linking.html#sendintent
*/
sendIntent(
action: String,
extras?: [{key: string, value: string | number | boolean}],

View File

@@ -1719,8 +1719,8 @@ class CellRenderer extends React.Component<
? [{flexDirection: 'row-reverse'}, inversionStyle]
: [{flexDirection: 'column-reverse'}, inversionStyle]
: horizontal
? [{flexDirection: 'row'}, inversionStyle]
: inversionStyle;
? [{flexDirection: 'row'}, inversionStyle]
: inversionStyle;
if (!CellRendererComponent) {
return (
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an

View File

@@ -20,8 +20,6 @@ import type {NativeMethodsMixinType} from 'ReactNativeTypes';
const {NativeMethodsMixin} = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
module.exports = {
NativeMethodsMixin: ((NativeMethodsMixin: any): $Exact<
NativeMethodsMixinType,
>),
NativeMethodsMixin: ((NativeMethodsMixin: any): $Exact<NativeMethodsMixinType>),
createReactNativeComponentClass,
};

View File

@@ -14,7 +14,7 @@ import * as React from 'react';
import GlobalPerformanceLogger from 'GlobalPerformanceLogger';
import type {IPerformanceLogger} from 'createPerformanceLogger';
const PerformanceLoggerContext: React.Context<
IPerformanceLogger,
> = React.createContext(GlobalPerformanceLogger);
const PerformanceLoggerContext: React.Context<IPerformanceLogger> = React.createContext(
GlobalPerformanceLogger,
);
export default PerformanceLoggerContext;

View File

@@ -142,12 +142,7 @@ class WebSocket extends EventTarget(...WEBSOCKET_EVENTS) {
this._eventEmitter = new NativeEventEmitter(WebSocketModule);
this._socketId = nextWebSocketId++;
this._registerEvents();
WebSocketModule.connect(
url,
protocols,
{headers},
this._socketId,
);
WebSocketModule.connect(url, protocols, {headers}, this._socketId);
}
get binaryType(): ?BinaryType {

View File

@@ -33,32 +33,32 @@ const YellowBoxImageSource = {
scale > 2
? 'data:image/png;base64,iVBORw0KGgoAA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:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAvUlEQVQ4jbWT4Q3CIBCFP40DdANxg24gIzhKuwEjuIFxAkcwTtARGicoG+iPXlMCB8UfvoQc4e7ePV4A/ogWuMlqc0W7AsEo0QMNcPplugMmwMia5KwKWkNIuIkHq3wLXGQ/Sq4IC3wkLpOfmZyKeEpIEKsDYB8VN0Afkfpg30uNiycbdKcNqXEOxdBEWoEAoqta8uZ0iqqkxwGDUrSFAXAHZpOWd/+ubD5Kz335Cx1wZna4Bh54AddauVl8ARfCLO9Xq7xGAAAAAElFTkSuQmCC',
check:
scale > 2
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAqElEQVRoge3YTQ7CIBRF4bPUu/8JS6gTSaqilh95vuR+CaO2cGgYNAUzMzOzFgHlPhRaMkDAcRoltKaTeIxPtQHxGn+Q5AgJx8cQjo8hHB9DOP76Yiu/RcTmN18WLiQCjs3zBkYXVGOeLWd+xcIr5pgyEzDz7FIjISPP/FRPUM+9W4nvYVfuCSXeB3669ldEOzRFfCUSx1cicXwlEsdXIvEPKDMzM7PMbtugw3XTpNA2AAAAAElFTkSuQmCC'
: scale > 1
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAf0lEQVRYhe2UvQ2AIBQGL3EBR3AESkv3bxxFN8DmWUgwvkI+En1X0cBd+IMg+DuDyDMCs413kfMiX4EMbD3l8oCaPIU85B4mYLEF5XJscrYFPRGvb/sZ4IlocubJGdH0wj1FSG77XYT0qdUi5O+8jOjyyZQRUnkZ0UUeBMF3OQC/0VsyGlxligAAAABJRU5ErkJggg=='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAASElEQVQ4jWNgGJHAgIGBIYESze8ZGBjWU6L5PAMDgwBNNCdAFZJt83qoQmRDSHK2AFQhzBCy/IxsCNkBJsDAwLAfiknWPBIBAETPFeuA4fr6AAAAAElFTkSuQmCC',
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAf0lEQVRYhe2UvQ2AIBQGL3EBR3AESkv3bxxFN8DmWUgwvkI+En1X0cBd+IMg+DuDyDMCs413kfMiX4EMbD3l8oCaPIU85B4mYLEF5XJscrYFPRGvb/sZ4IlocubJGdH0wj1FSG77XYT0qdUi5O+8jOjyyZQRUnkZ0UUeBMF3OQC/0VsyGlxligAAAABJRU5ErkJggg=='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAASElEQVQ4jWNgGJHAgIGBIYESze8ZGBjWU6L5PAMDgwBNNCdAFZJt83qoQmRDSHK2AFQhzBCy/IxsCNkBJsDAwLAfiknWPBIBAETPFeuA4fr6AAAAAElFTkSuQmCC',
chevronLeft:
scale > 2
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAgElEQVRoge3YMQ6DQBAEwRYvnf8nPAECbAnkyATsrt0lXUyPdAE6kCRJ/yXA+jopLbkhwHY6a2nNl8I1ftSA8Bm/MeQKBeNrBONrBONrBONrhMHxcPwOlMUvT32oszD8CoEj+giO6CE4oofgiB7Cj44Y86zyFoYPgOFPi5Ik6WwHji+QVIOyhqgAAAAASUVORK5CYII='
: scale > 1
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAaUlEQVRYhe3WsQ2AMAwAwRcs5LEYg3HpYANoQKKgcEEUI/6adM5LbgySfmZsNDeACdiApdEfaQGswH6+Xd1jugc9xYQxxhjz9RhaxwxvDuul3MrAqDyjsozKKnWgXUqdsJcAZgqsTFJ5B7gjUNw0n0HHAAAAAElFTkSuQmCC'
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAARklEQVQ4jWNgGPKAmUh1AQwMDBIMDAwPyLEkgYGB4T/UELI1J9BdcwCxmpnIMZ1YkECsK+hmCNZoZCHCgAUMDAwfoHg4AgDJuQ/bcLyV+QAAAABJRU5ErkJggg==',
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAaUlEQVRYhe3WsQ2AMAwAwRcs5LEYg3HpYANoQKKgcEEUI/6adM5LbgySfmZsNDeACdiApdEfaQGswH6+Xd1jugc9xYQxxhjz9RhaxwxvDuul3MrAqDyjsozKKnWgXUqdsJcAZgqsTFJ5B7gjUNw0n0HHAAAAAElFTkSuQmCC'
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAARklEQVQ4jWNgGPKAmUh1AQwMDBIMDAwPyLEkgYGB4T/UELI1J9BdcwCxmpnIMZ1YkECsK+hmCNZoZCHCgAUMDAwfoHg4AgDJuQ/bcLyV+QAAAABJRU5ErkJggg==',
chevronRight:
scale > 2
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAeElEQVRoge3YMQ6AIBQE0Ykn3fs3HEEbC6MdFp+v8xJaspNQAZIkqbcA4zwpXTJpAPvlpHTNhHtAu4jwDDCiQjBiDcGINQQj1hCMWEN4Boy3l25vL/iL0PgJBcfXCI6vERxfIzi+Rmg8Hj7wrdL+Yys0/1qUJEmzDvSAkFQ8EOdJAAAAAElFTkSuQmCC'
: scale > 1
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAZElEQVRYhe3WsQmAQAxA0Y8ulLEcw3HtdANtBNvzCJjD/5pUgQ9pApJ+Zu7YCWABDmDLzemzA+c94+MW4AkqExUY1caoVka1GibqlSm7qJJSJzPGGGMylYqBgi9sACtFYiQN7wKC6VDcJ7tlpQAAAABJRU5ErkJggg=='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAANUlEQVQ4jWNgGLbAgYGBIYASAwIYGBj+MzAwJFBiSMLQMISJEpMptp2mmimORgcGChPSEAIAHGENPH8gqdYAAAAASUVORK5CYII=',
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAZElEQVRYhe3WsQmAQAxA0Y8ulLEcw3HtdANtBNvzCJjD/5pUgQ9pApJ+Zu7YCWABDmDLzemzA+c94+MW4AkqExUY1caoVka1GibqlSm7qJJSJzPGGGMylYqBgi9sACtFYiQN7wKC6VDcJ7tlpQAAAABJRU5ErkJggg=='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAANUlEQVQ4jWNgGLbAgYGBIYASAwIYGBj+MzAwJFBiSMLQMISJEpMptp2mmimORgcGChPSEAIAHGENPH8gqdYAAAAASUVORK5CYII=',
loader:
scale > 2
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABXElEQVRoge2a3W3DMAyEr+0CHkGjaISOcKN4k6zQETpCR+gGzgbpQ10kcamIpKQ6avQBBPxg3pHwL2UDg/8LASxrcNdKnCwATmssrUyeWgnju/DmXs8tRP+Sh2kgAJga1rFlWj2rcMD5YqQh77QJLbzIORjyRIJQCJW5ngYo5AVlrsgkCGqbsDbAhFfxqZsSZibP0oDXQ43HQPsg82i7sBoR+VcJq2YxKcPo0IoJLRZXmYGC6ezQmQUdVqhPBVH/CNBTSMkLVlzjA8Bbocb7GoPBoADi+umZilYzbrG/JrnljOvy734iu4To/BQaDB6Rl4LciPPF9Lmjhgvi+s7w6tCIGw3WKS0P8fvWNjt0ZkGHFeq7CQXTbkZKGg2JOxrqPUZ3s6ziNdju38IjS/dLi0EQpDLX2gDQYHEX6Hx5/YcA+6H0NgAYPnCMj3x7Mxq4wTGx3Q1E578aDDR8AX0mOGD6BEN/AAAAAElFTkSuQmCC'
: scale > 1
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABN0lEQVRYhe2WzU3EMBCFP34KyJEjJaQDXAIlJJ24BSow2wEdhHSwJSwd7JHbcmC0mOxMnDiWDIInWbHkN29exo4n8IvRAEFGU8OAA04yulyR60Jm7msbyIZloAMGwBfI4UWrWxM08LW/weC4iOMNTog4g0awKjBG827GxBwC3996NHizAifsSrTRmlsZm23CT9adktyXSq6ZUPdxgiXnZzW8CLcLuC3lvqA/gCt5NtjlPQL7TP0Wu1HtRRu4PO3T4TKTz2kG+AG9IN6CR/Su9iojBw69egfghWgL/pGCp+JFVPUqTjWjlsuqeAo1o6rt2C8QcNiV0UxoHPMieojmz0CfMKyhl1hN84xbI3gnz5Ftp7kH3iT5LsFdDUf6pzSJ6r2glIFDbuDNhqRH4I7Pvv4EvG/QqocP2Jh/xzzX/zUAAAAASUVORK5CYII='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAsklEQVQ4jaWTYRHCMAyFP7gJmIQ6oChgEpBQKXMwC3MADpAAEiphDuBHC4QuDRu8u9ylyWtem7Rgw2X7GT1wsghb4beAVzhtsfYyJgs44AoEQzBkjrMId1HkKPwyZ6oMSnxYsnk1NqT7yMo34Fzhd9meGJvs7Hh3NhqCLXDI/rT0lKsR+KOJgc9RdaRRarkZvELogYsi8HqxjUhGYE+aQg1jzketwFTZXHbbEpjB8eU7PwAbLiJz46707gAAAABJRU5ErkJggg==',
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABN0lEQVRYhe2WzU3EMBCFP34KyJEjJaQDXAIlJJ24BSow2wEdhHSwJSwd7JHbcmC0mOxMnDiWDIInWbHkN29exo4n8IvRAEFGU8OAA04yulyR60Jm7msbyIZloAMGwBfI4UWrWxM08LW/weC4iOMNTog4g0awKjBG827GxBwC3996NHizAifsSrTRmlsZm23CT9adktyXSq6ZUPdxgiXnZzW8CLcLuC3lvqA/gCt5NtjlPQL7TP0Wu1HtRRu4PO3T4TKTz2kG+AG9IN6CR/Su9iojBw69egfghWgL/pGCp+JFVPUqTjWjlsuqeAo1o6rt2C8QcNiV0UxoHPMieojmz0CfMKyhl1hN84xbI3gnz5Ftp7kH3iT5LsFdDUf6pzSJ6r2glIFDbuDNhqRH4I7Pvv4EvG/QqocP2Jh/xzzX/zUAAAAASUVORK5CYII='
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAsklEQVQ4jaWTYRHCMAyFP7gJmIQ6oChgEpBQKXMwC3MADpAAEiphDuBHC4QuDRu8u9ylyWtem7Rgw2X7GT1wsghb4beAVzhtsfYyJgs44AoEQzBkjrMId1HkKPwyZ6oMSnxYsnk1NqT7yMo34Fzhd9meGJvs7Hh3NhqCLXDI/rT0lKsR+KOJgc9RdaRRarkZvELogYsi8HqxjUhGYE+aQg1jzketwFTZXHbbEpjB8eU7PwAbLiJz46707gAAAABJRU5ErkJggg==',
};
module.exports = YellowBoxImageSource;

View File

@@ -61,7 +61,9 @@ class BasicStorageExample extends React.Component<{}, $FlowFixMeState> {
</Text>
<Text />
<Text>Messages:</Text>
{this.state.messages.map(m => <Text key={m}>{m}</Text>)}
{this.state.messages.map(m => (
<Text key={m}>{m}</Text>
))}
</View>
);
}

View File

@@ -70,7 +70,9 @@ class InputAccessoryViewExample extends React.Component<InputAccessoryProps> {
<ScrollView style={styles.fill} keyboardDismissMode="interactive">
{Array(15)
.fill()
.map((_, i) => <Message key={i} />)}
.map((_, i) => (
<Message key={i} />
))}
</ScrollView>
<InputAccessoryView backgroundColor="#fffffff7">
<TextInputBar />

View File

@@ -174,7 +174,9 @@ class LayoutExample extends React.Component<$FlowFixMeProps> {
</RNTesterBlock>
<RNTesterBlock title="Flex Wrap">
<CircleBlock style={{flexWrap: 'wrap'}}>
{'oooooooooooooooo'.split('').map((char, i) => <Circle key={i} />)}
{'oooooooooooooooo'.split('').map((char, i) => (
<Circle key={i} />
))}
</CircleBlock>
</RNTesterBlock>
</RNTesterPage>

View File

@@ -133,8 +133,8 @@ class IsConnectionExpensive extends React.Component<{}, $FlowFixMeState> {
{this.state.isConnectionExpensive === true
? 'Expensive'
: this.state.isConnectionExpensive === false
? 'Not expensive'
: 'Unknown'}
? 'Not expensive'
: 'Unknown'}
</Text>
</View>
</TouchableWithoutFeedback>

View File

@@ -42,8 +42,8 @@ class ExampleBox extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
onTouchEndCapture={this.handleTouchCapture}
onTouchStart={this.flushReactChanges}>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
<this.props.Component onLog={this.handleLog} />
</View>
<View style={styles.logBox}>

View File

@@ -62,7 +62,7 @@ class ProgressBarAndroidExample extends React.Component<{}> {
<RNTesterPage title="ProgressBar Examples">
<RNTesterBlock title="Horizontal Indeterminate ProgressBar">
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<ProgressBar styleAttr="Horizontal" />
</RNTesterBlock>
@@ -72,7 +72,7 @@ class ProgressBarAndroidExample extends React.Component<{}> {
<RNTesterBlock title="Horizontal Black Indeterminate ProgressBar">
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<ProgressBar styleAttr="Horizontal" color="black" />
</RNTesterBlock>

View File

@@ -87,10 +87,8 @@ class StatusBarHiddenExample extends React.Component<{}, $FlowFixMeState> {
onPress={this._onChangeTransition}>
<View style={styles.button}>
<Text>
showHideTransition (ios only): '{getValue(
showHideTransitions,
this._showHideTransitionIndex,
)}'
showHideTransition (ios only): '
{getValue(showHideTransitions, this._showHideTransitionIndex)}'
</Text>
</View>
</TouchableHighlight>

View File

@@ -477,9 +477,8 @@ class TextExample extends React.Component<{}> {
app.
</Text>
<Text style={{marginTop: 10}}>
You can disable scaling for your Text component by passing {'"'}allowFontScaling={
'{'
}false{'}"'} prop.
You can disable scaling for your Text component by passing {'"'}
allowFontScaling={'{'}false{'}"'} prop.
</Text>
<Text allowFontScaling={false} style={{marginTop: 20, fontSize: 15}}>
This text will not scale.{' '}
@@ -642,7 +641,6 @@ const styles = StyleSheet.create({
alignSelf: 'center',
},
});
exports.title = '<Text>';
exports.description = 'Base component for rendering styled text.';
exports.examples = [

View File

@@ -882,9 +882,8 @@ exports.examples = [
</Text>
</Text>
<Text style={{marginTop: 10}}>
You can disable scaling for your Text component by passing {'"'}allowFontScaling={
'{'
}false{'}"'} prop.
You can disable scaling for your Text component by passing {'"'}
allowFontScaling={'{'}false{'}"'} prop.
</Text>
<Text allowFontScaling={false} style={{marginTop: 20, fontSize: 15}}>
This text will not scale.{' '}

View File

@@ -104,7 +104,7 @@ class RewriteExample extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
value={this.state.text}
/>
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<Text style={[styles.remainder, {color: remainderColor}]}>
{remainder}
</Text>
@@ -408,10 +408,10 @@ class AutogrowingTextInputExample extends React.Component<{}> {
/>
<Text>Plain text value representation:</Text>
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<Text>{this.state.text}</Text>
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */}
* found when making Flow check .android.js files. */}
<Text>Content Size: {JSON.stringify(this.state.contentSize)}</Text>
</View>
);

View File

@@ -178,7 +178,9 @@ class TouchableFeedbackEvents extends React.Component<{}, $FlowFixMeState> {
<View
testID="touchable_feedback_events_console"
style={styles.eventLogBox}>
{this.state.eventLog.map((e, ii) => <Text key={ii}>{e}</Text>)}
{this.state.eventLog.map((e, ii) => (
<Text key={ii}>{e}</Text>
))}
</View>
</View>
);
@@ -217,7 +219,9 @@ class TouchableDelayEvents extends React.Component<{}, $FlowFixMeState> {
<View
style={styles.eventLogBox}
testID="touchable_delay_events_console">
{this.state.eventLog.map((e, ii) => <Text key={ii}>{e}</Text>)}
{this.state.eventLog.map((e, ii) => (
<Text key={ii}>{e}</Text>
))}
</View>
</View>
);

View File

@@ -165,8 +165,8 @@ class XHRExampleDownload extends React.Component<{}, Object> {
readystate = (
<View>
<Text style={styles.progressBarLabel}>
responseText: {roundKilo(responseLength)}/{roundKilo(contentLength)}k
chars
responseText: {roundKilo(responseLength)}/{roundKilo(contentLength)}
k chars
</Text>
<ProgressBar progress={responseLength / contentLength} />
</View>

View File

@@ -52,25 +52,28 @@ class XHRExampleFormData extends React.Component<Object, Object> {
first: PAGE_SIZE,
groupTypes: 'All',
assetType: 'All',
}).then(data => {
if (!this._isMounted) {
return;
}
const edges = data.edges;
const edge = edges[Math.floor(Math.random() * edges.length)];
const randomPhoto = edge && edge.node && edge.node.image;
if (randomPhoto) {
let {width, height} = randomPhoto;
width *= 0.25;
height *= 0.25;
ImageEditor.cropImage(
randomPhoto.uri,
{offset: {x: 0, y: 0}, size: {width, height}},
uri => this.setState({randomPhoto: {uri}}),
error => undefined,
);
}
}, error => undefined);
}).then(
data => {
if (!this._isMounted) {
return;
}
const edges = data.edges;
const edge = edges[Math.floor(Math.random() * edges.length)];
const randomPhoto = edge && edge.node && edge.node.image;
if (randomPhoto) {
let {width, height} = randomPhoto;
width *= 0.25;
height *= 0.25;
ImageEditor.cropImage(
randomPhoto.uri,
{offset: {x: 0, y: 0}, size: {width, height}},
uri => this.setState({randomPhoto: {uri}}),
error => undefined,
);
}
},
error => undefined,
);
};
_addTextParam = () => {
@@ -166,11 +169,11 @@ class XHRExampleFormData extends React.Component<Object, Object> {
<View>
<View style={styles.paramRow}>
<Text style={styles.photoLabel}>
Random photo from your library (<Text
style={styles.textButton}
onPress={this._fetchRandomPhoto}>
Random photo from your library (
<Text style={styles.textButton} onPress={this._fetchRandomPhoto}>
update
</Text>)
</Text>
)
</Text>
{image}
</View>

View File

@@ -23,8 +23,8 @@ const extractSingleTouch = nativeEvent => {
return !hasTouches && hasChangedTouches
? changedTouches[0]
: hasTouches
? touches[0]
: nativeEvent;
? touches[0]
: nativeEvent;
};
class TouchTestApp extends React.Component {

View File

@@ -90,9 +90,7 @@ const FlexWithTextStyles = StyleSheet.create({
});
type AbsolutePositionTestAppProps = $ReadOnly<{||}>;
class AbsolutePositionTestApp extends React.Component<
AbsolutePositionTestAppProps,
> {
class AbsolutePositionTestApp extends React.Component<AbsolutePositionTestAppProps> {
render() {
return (
<View
@@ -115,9 +113,7 @@ const AbsolutePositionTestAppStyles = StyleSheet.create({
});
type AbsolutePositionBottomRightTestAppProps = $ReadOnly<{||}>;
class AbsolutePositionBottomRightTestApp extends React.Component<
AbsolutePositionBottomRightTestAppProps,
> {
class AbsolutePositionBottomRightTestApp extends React.Component<AbsolutePositionBottomRightTestAppProps> {
render() {
return (
<View

View File

@@ -41,9 +41,7 @@ function getPlugins() {
const plugins = getPlugins();
// Detect out-of-tree platforms and add them to the whitelists
const pluginRoots /*: Array<
string,
> */ = plugins.haste.providesModuleNodeModules.map(
const pluginRoots /*: Array<string> */ = plugins.haste.providesModuleNodeModules.map(
name => path.resolve(__dirname, '../../', name) + path.sep,
);

View File

@@ -130,7 +130,7 @@
"jest": "24.1.0",
"jest-junit": "6.3.0",
"jscodeshift": "^0.6.2",
"prettier": "1.13.6",
"prettier": "1.16.4",
"react": "16.8.3",
"react-native-dummy": "0.2.0",
"react-test-renderer": "16.8.3",

View File

@@ -16,7 +16,7 @@
"eslint-plugin-react": "7.8.2",
"eslint-plugin-react-hooks": "^1.0.1",
"eslint-plugin-react-native": "3.5.0",
"prettier": "1.13.6"
"prettier": "1.16.4"
},
"peerDependencies": {
"eslint": ">=5"

View File

@@ -840,10 +840,10 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
prettier@1.13.6:
version "1.13.6"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.6.tgz#00ae0b777ad92f81a9e7a1df2f0470b6dab0cb44"
integrity sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==
prettier@1.16.4:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
progress@^2.0.0:
version "2.0.3"

View File

@@ -235,24 +235,26 @@ function main(messages, owner, repo, number) {
getFilesFromPullRequest(owner, repo, number, files => {
let comments = [];
let convertersUsed = [];
files.filter(file => messages[file.filename]).forEach(file => {
// github api sometimes does not return a patch on large commits
if (!file.patch) {
return;
}
const lineMap = getLineMapFromPatch(file.patch);
messages[file.filename].forEach(message => {
if (lineMap[message.line]) {
const comment = {
path: file.filename,
position: lineMap[message.line],
body: message.message,
};
convertersUsed.push(message.converter);
comments.push(comment);
files
.filter(file => messages[file.filename])
.forEach(file => {
// github api sometimes does not return a patch on large commits
if (!file.patch) {
return;
}
}); // forEach
}); // filter
const lineMap = getLineMapFromPatch(file.patch);
messages[file.filename].forEach(message => {
if (lineMap[message.line]) {
const comment = {
path: file.filename,
position: lineMap[message.line],
body: message.message,
};
convertersUsed.push(message.converter);
comments.push(comment);
}
}); // forEach
}); // filter
let body = '**Code analysis results:**\n\n';
const uniqueconvertersUsed = [...new Set(convertersUsed)];

View File

@@ -5566,10 +5566,10 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
prettier@1.13.6:
version "1.13.6"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.6.tgz#00ae0b777ad92f81a9e7a1df2f0470b6dab0cb44"
integrity sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==
prettier@1.16.4:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==
pretty-format@24.0.0-alpha.6:
version "24.0.0-alpha.6"