From eb43d2469a511ec9d1121468ea36fc3c7f97db08 Mon Sep 17 00:00:00 2001 From: Salakar Date: Fri, 21 Jun 2019 14:27:14 +0100 Subject: [PATCH] Formatting: run prettier --- packages/analytics/lib/index.d.ts | 24 ++++------ packages/app-types/index.js.flow | 34 +++++++------- packages/auth/lib/index.d.ts | 1 - packages/firestore/lib/index.d.ts | 9 +--- packages/firestore/lib/index.js.flow | 4 +- packages/iid/lib/index.d.ts | 4 +- packages/template/project/app.json | 2 +- packages/template/project/firebase.json | 4 +- packages/template/project/index.js | 4 +- .../AppIcon.appiconset/Contents.json | 46 +++++++++---------- .../HelloWorld/Images.xcassets/Contents.json | 6 +-- packages/utils/lib/index.d.ts | 10 +--- 12 files changed, 62 insertions(+), 86 deletions(-) diff --git a/packages/analytics/lib/index.d.ts b/packages/analytics/lib/index.d.ts index e4b8e53d..c2c90b28 100644 --- a/packages/analytics/lib/index.d.ts +++ b/packages/analytics/lib/index.d.ts @@ -18,8 +18,8 @@ import { ReactNativeFirebaseModule, ReactNativeFirebaseModuleAndStatics, - ReactNativeFirebaseNamespace -} from "@react-native-firebase/app-types"; + ReactNativeFirebaseNamespace, +} from '@react-native-firebase/app-types'; /** * Firebase Analytics package for React Native. @@ -124,10 +124,7 @@ export namespace Analytics { * @param screenClassOverride On Android, React Native runs in a single activity called * 'MainActivity'. Setting this parameter overrides the default name shown on logs. */ - setCurrentScreen( - screenName: string, - screenClassOverride?: string - ): Promise; + setCurrentScreen(screenName: string, screenClassOverride?: string): Promise; /** * Sets the minimum engagement time required before starting a session. @@ -203,9 +200,7 @@ export namespace Analytics { * @react-native-firebase * @param properties Set a property value to null to remove it. */ - setUserProperties(properties: { - [key: string]: string | null; - }): Promise; + setUserProperties(properties: { [key: string]: string | null }): Promise; /** * Clears all analytics data for this instance from the device and resets the app instance ID. @@ -220,8 +215,8 @@ export namespace Analytics { } } -declare module "@react-native-firebase/analytics" { - import { ReactNativeFirebaseNamespace } from "@react-native-firebase/app-types"; +declare module '@react-native-firebase/analytics' { + import { ReactNativeFirebaseNamespace } from '@react-native-firebase/app-types'; const FirebaseNamespaceExport: {} & ReactNativeFirebaseNamespace; @@ -244,12 +239,9 @@ declare module "@react-native-firebase/analytics" { /** * Attach namespace to `firebase.` and `FirebaseApp.`. */ -declare module "@react-native-firebase/app-types" { +declare module '@react-native-firebase/app-types' { interface ReactNativeFirebaseNamespace { - analytics: ReactNativeFirebaseModuleAndStatics< - Analytics.Module, - Analytics.Statics - >; + analytics: ReactNativeFirebaseModuleAndStatics; } interface FirebaseApp { diff --git a/packages/app-types/index.js.flow b/packages/app-types/index.js.flow index cb2c0376..a9ebfdfb 100644 --- a/packages/app-types/index.js.flow +++ b/packages/app-types/index.js.flow @@ -15,40 +15,40 @@ * */ export type ReactNativeFirebaseModuleAndStatics = { - (): M; - +SDK_VERSION: string; + (): M, + +SDK_VERSION: string, } & S; export type ReactNativeFirebaseModuleAndStaticsWithApp = { - (): M; - +SDK_VERSION: string; + (): M, + +SDK_VERSION: string, } & S; export type FirebaseOptions = { - appId: string; - apiKey?: string; - authDomain?: string; - databaseURL: string; - projectId: string; - gaTrackingId?: string; - storageBucket: string; - messagingSenderId: string; + appId: string, + apiKey?: string, + authDomain?: string, + databaseURL: string, + projectId: string, + gaTrackingId?: string, + storageBucket: string, + messagingSenderId: string, /** * iOS only */ - clientId?: string; + clientId?: string, /** * iOS only */ - androidClientId?: string; + androidClientId?: string, /** * iOS only */ - deepLinkURLScheme?: string; - [name: string]: any; + deepLinkURLScheme?: string, + [name: string]: any, }; export interface FirebaseAppConfig { @@ -67,7 +67,7 @@ export interface ReactNativeFirebaseNamespace { initializeApp(options: FirebaseOptions, name?: string): FirebaseApp; app: { - (name?: string): FirebaseApp; + (name?: string): FirebaseApp, }; apps: FirebaseApp[]; diff --git a/packages/auth/lib/index.d.ts b/packages/auth/lib/index.d.ts index 9f9b17ef..7a1d6234 100644 --- a/packages/auth/lib/index.d.ts +++ b/packages/auth/lib/index.d.ts @@ -60,7 +60,6 @@ import { * @firebase auth */ export namespace Auth { - /** * Interface that represents the credentials returned by an auth provider. Implementations specify the details * about each auth provider's credential requirements. diff --git a/packages/firestore/lib/index.d.ts b/packages/firestore/lib/index.d.ts index 759651db..04c525b4 100644 --- a/packages/firestore/lib/index.d.ts +++ b/packages/firestore/lib/index.d.ts @@ -81,9 +81,7 @@ export namespace Firestore { * ``` * */ - export class Module extends ReactNativeFirebaseModule { - - } + export class Module extends ReactNativeFirebaseModule {} } declare module '@react-native-firebase/firestore' { @@ -122,10 +120,7 @@ declare module '@react-native-firebase/app-types' { /** * Firestore */ - firestore: ReactNativeFirebaseModuleAndStatics< - Firestore.Module, - Firestore.Statics - >; + firestore: ReactNativeFirebaseModuleAndStatics; } interface FirebaseApp { diff --git a/packages/firestore/lib/index.js.flow b/packages/firestore/lib/index.js.flow index b4a771f0..61d7c800 100644 --- a/packages/firestore/lib/index.js.flow +++ b/packages/firestore/lib/index.js.flow @@ -20,9 +20,7 @@ import type { ReactNativeFirebaseModule } from '@react-native-firebase/app-types export interface Statics {} -export interface Module extends ReactNativeFirebaseModule { - -} +export interface Module extends ReactNativeFirebaseModule {} declare module '@react-native-firebase/firestore' { import type { diff --git a/packages/iid/lib/index.d.ts b/packages/iid/lib/index.d.ts index 509dd27f..5c14f819 100644 --- a/packages/iid/lib/index.d.ts +++ b/packages/iid/lib/index.d.ts @@ -135,8 +135,8 @@ export namespace Iid { declare module '@react-native-firebase/iid' { import { ReactNativeFirebaseModuleAndStaticsWithApp, - ReactNativeFirebaseNamespace -} from '@react-native-firebase/app-types'; + ReactNativeFirebaseNamespace, + } from '@react-native-firebase/app-types'; const FirebaseNamespaceExport: {} & ReactNativeFirebaseNamespace; diff --git a/packages/template/project/app.json b/packages/template/project/app.json index 114d929c..cbbc3051 100755 --- a/packages/template/project/app.json +++ b/packages/template/project/app.json @@ -1,4 +1,4 @@ { "name": "HelloWorld", "displayName": "HelloWorld" -} \ No newline at end of file +} diff --git a/packages/template/project/firebase.json b/packages/template/project/firebase.json index 55916022..d7cf6619 100644 --- a/packages/template/project/firebase.json +++ b/packages/template/project/firebase.json @@ -1,5 +1,3 @@ { - "react-native": { - - } + "react-native": {} } diff --git a/packages/template/project/index.js b/packages/template/project/index.js index a850d031..9b739329 100755 --- a/packages/template/project/index.js +++ b/packages/template/project/index.js @@ -2,8 +2,8 @@ * @format */ -import {AppRegistry} from 'react-native'; +import { AppRegistry } from 'react-native'; import App from './App'; -import {name as appName} from './app.json'; +import { name as appName } from './app.json'; AppRegistry.registerComponent(appName, () => App); diff --git a/packages/template/project/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/template/project/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json index 118c98f7..48e64ae8 100755 --- a/packages/template/project/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/packages/template/project/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,38 +1,38 @@ { - "images" : [ + "images": [ { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "idiom": "iphone", + "size": "29x29", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "idiom": "iphone", + "size": "29x29", + "scale": "3x" }, { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "idiom": "iphone", + "size": "40x40", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "idiom": "iphone", + "size": "40x40", + "scale": "3x" }, { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "idiom": "iphone", + "size": "60x60", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "idiom": "iphone", + "size": "60x60", + "scale": "3x" } ], - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } -} \ No newline at end of file +} diff --git a/packages/template/project/ios/HelloWorld/Images.xcassets/Contents.json b/packages/template/project/ios/HelloWorld/Images.xcassets/Contents.json index 2d92bd53..97a8662e 100755 --- a/packages/template/project/ios/HelloWorld/Images.xcassets/Contents.json +++ b/packages/template/project/ios/HelloWorld/Images.xcassets/Contents.json @@ -1,6 +1,6 @@ { - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } } diff --git a/packages/utils/lib/index.d.ts b/packages/utils/lib/index.d.ts index 9cc9c892..1f37bd1b 100644 --- a/packages/utils/lib/index.d.ts +++ b/packages/utils/lib/index.d.ts @@ -97,10 +97,7 @@ declare module '@react-native-firebase/utils' { */ export const firebase = FirebaseNamespaceExport; - const UtilsDefaultExport: ReactNativeFirebaseModuleAndStatics< - Utils.Module, - Utils.Statics - >; + const UtilsDefaultExport: ReactNativeFirebaseModuleAndStatics; /** * @example * ```js @@ -121,10 +118,7 @@ declare module '@react-native-firebase/app-types' { * and related services inside React Native, e.g. Test Lab helpers * and Google Play Services version helpers. */ - utils: ReactNativeFirebaseModuleAndStatics< - Utils.Module, - Utils.Statics - >; + utils: ReactNativeFirebaseModuleAndStatics; } interface FirebaseApp {