Upgrade Prettier from 1.17 to 2.0.2.

Summary:
This gets us on the latest Prettier 2.x:
https://prettier.io/blog/2020/03/21/2.0.0.html

Notably, this adds support for TypeScript 3.8,
which introduces new syntax, such as `import type`.

Reviewed By: zertosh

Differential Revision: D20636268

fbshipit-source-id: fca5833d003804333a05ba16325bbbe0e06d6c8a
This commit is contained in:
Michael Bolin
2020-03-24 20:24:47 -07:00
committed by Facebook GitHub Bot
parent 79c69bea02
commit cf44650b3f
383 changed files with 2051 additions and 2072 deletions
@@ -87,7 +87,7 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
step={10}
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */
onValueChange={value => this.setState({width: value})}
onValueChange={(value) => this.setState({width: value})}
/>
<Text>Multiline:</Text>
<Switch
@@ -96,7 +96,7 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
value={this.state.multiline}
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */
onValueChange={value => this.setState({multiline: value})}
onValueChange={(value) => this.setState({multiline: value})}
/>
<Text>TextInput:</Text>
<TextInput
@@ -108,8 +108,8 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
style={[style, {width: this.state.width + '%'}]}
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */
onChangeText={value => this.setState({text: value})}
onContentSizeChange={event =>
onChangeText={(value) => this.setState({text: value})}
onContentSizeChange={(event) =>
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
* found when making Flow check .android.js files. */
this.setState({contentSize: event.nativeEvent.contentSize})
@@ -149,7 +149,7 @@ exports.examples = ([
...TextInputSharedExamples,
{
title: 'Colors and text inputs',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -199,7 +199,7 @@ exports.examples = ([
},
{
title: 'Text input, themes and heights',
render: function(): React.Node {
render: function (): React.Node {
return (
<TextInput
placeholder="If you set height, beware of padding set from themes"
@@ -210,7 +210,7 @@ exports.examples = ([
},
{
title: 'letterSpacing',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -235,7 +235,7 @@ exports.examples = ([
},
{
title: 'Passwords',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -255,7 +255,7 @@ exports.examples = ([
},
{
title: 'Editable',
render: function(): React.Node {
render: function (): React.Node {
return (
<TextInput
defaultValue="Can't touch this! (>'-')> ^(' - ')^ <('-'<) (>'-')> ^(' - ')^"
@@ -267,7 +267,7 @@ exports.examples = ([
},
{
title: 'Multiline',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -309,7 +309,7 @@ exports.examples = ([
{
title: 'Fixed number of lines',
platform: 'android',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -328,7 +328,7 @@ exports.examples = ([
},
{
title: 'Auto-expanding',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<AutogrowingTextInputExample
@@ -352,7 +352,7 @@ exports.examples = ([
},
{
title: 'Return key',
render: function(): React.Node {
render: function (): React.Node {
const returnKeyTypes = [
'none',
'go',
@@ -363,7 +363,7 @@ exports.examples = ([
'next',
];
const returnKeyLabels = ['Compile', 'React Native'];
const examples = returnKeyTypes.map(type => {
const examples = returnKeyTypes.map((type) => {
return (
<TextInput
key={type}
@@ -373,7 +373,7 @@ exports.examples = ([
/>
);
});
const types = returnKeyLabels.map(type => {
const types = returnKeyLabels.map((type) => {
return (
<TextInput
key={type}
@@ -393,7 +393,7 @@ exports.examples = ([
},
{
title: 'Inline Images',
render: function(): React.Node {
render: function (): React.Node {
return (
<View>
<TextInput
@@ -417,7 +417,7 @@ exports.examples = ([
},
{
title: 'Toggle Default Padding',
render: function(): React.Node {
render: function (): React.Node {
return <ToggleDefaultPaddingExample />;
},
},