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:18:20 -07:00
committed by Facebook GitHub Bot
parent da89a92875
commit 8658fca4dd
25 changed files with 101 additions and 101 deletions

View File

@@ -378,7 +378,7 @@ function addFileWatcherForiOSCrashLogs(
return;
}
const filepath = path.join(dir, filename);
promisify(fs.exists)(filepath).then((exists) => {
promisify(fs.exists)(filepath).then(exists => {
if (!exists) {
return;
}
@@ -572,7 +572,7 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin<
static getActiveNotifications = (
persistedState: PersistedState,
): Array<Notification> => {
const filteredCrashes = persistedState.crashes.filter((crash) => {
const filteredCrashes = persistedState.crashes.filter(crash => {
const ignore = !crash.name && !crash.reason;
const unknownCrashCause = crash.reason === UNKNOWN_CRASH_REASON;
if (ignore || unknownCrashCause) {
@@ -679,7 +679,7 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin<
let deeplinkedCrash = null;
if (this.props.deepLinkPayload) {
const id = this.props.deepLinkPayload;
const index = this.props.persistedState.crashes.findIndex((elem) => {
const index = this.props.persistedState.crashes.findIndex(elem => {
return elem.notificationID === id;
});
if (index >= 0) {
@@ -714,18 +714,18 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin<
);
const orderedIDs = crashes.map(
(persistedCrash) => persistedCrash.notificationID,
persistedCrash => persistedCrash.notificationID,
);
const selectedCrashID = crash.notificationID;
const onCrashChange = (id) => {
const onCrashChange = id => {
const newSelectedCrash = crashes.find(
(element) => element.notificationID === id,
element => element.notificationID === id,
);
this.setState({crash: newSelectedCrash});
};
const callstackString = crash.callstack || '';
const children = callstackString.split('\n').map((str) => {
const children = callstackString.split('\n').map(str => {
return {message: str};
});
const crashSelector: CrashSelectorProps = {
@@ -767,7 +767,7 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin<
},
]}>
<Line />
{children.map((child) => {
{children.map(child => {
return (
<StackTraceComponent
key={child.message}