Back out "Upgrade Prettier from 1.17 to 2.0.2."

Differential Revision: D20639755

fbshipit-source-id: 5028563f9cf0527a30b4259daac50cdc03934bfd
This commit is contained in:
Michael Bolin
2020-03-24 21:47:35 -07:00
committed by Facebook GitHub Bot
parent cf44650b3f
commit 0b9ea60b4f
383 changed files with 2072 additions and 2051 deletions
@@ -40,17 +40,17 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
// Add calls to methods in TurboModule here
_tests = {
callback: () =>
NativeSampleTurboModule.getValueWithCallback((callbackValue) =>
NativeSampleTurboModule.getValueWithCallback(callbackValue =>
this._setResult('callback', callbackValue),
),
promise: () =>
NativeSampleTurboModule.getValueWithPromise(false).then((valuePromise) =>
NativeSampleTurboModule.getValueWithPromise(false).then(valuePromise =>
this._setResult('promise', valuePromise),
),
rejectPromise: () =>
NativeSampleTurboModule.getValueWithPromise(true)
.then(() => {})
.catch((e) => this._setResult('rejectPromise', e.message)),
.catch(e => this._setResult('rejectPromise', e.message)),
getConstants: () => NativeSampleTurboModule.getConstants(),
voidFunc: () => NativeSampleTurboModule.voidFunc(),
getBool: () => NativeSampleTurboModule.getBool(true),
@@ -101,7 +101,7 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
}
if (Platform.OS === 'ios') {
// iOS is fully implemented, so show all results immediately.
Object.keys(this._tests).forEach((item) =>
Object.keys(this._tests).forEach(item =>
this._setResult(item, this._tests[item]()),
);
}
@@ -114,7 +114,7 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
<TouchableOpacity
style={[styles.column, styles.button]}
onPress={() =>
Object.keys(this._tests).forEach((item) =>
Object.keys(this._tests).forEach(item =>
this._setResult(item, this._tests[item]()),
)
}>
@@ -128,12 +128,12 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
</View>
<FlatList
data={Object.keys(this._tests)}
keyExtractor={(item) => item}
keyExtractor={item => item}
renderItem={({item}) => (
<View style={styles.item}>
<TouchableOpacity
style={[styles.column, styles.button]}
onPress={(e) => this._setResult(item, this._tests[item]())}>
onPress={e => this._setResult(item, this._tests[item]())}>
<Text style={styles.buttonText}>{item}</Text>
</TouchableOpacity>
<View style={[styles.column]}>{this._renderResult(item)}</View>