mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-29 20:57:00 +08:00
[js] add workaround for module-resolver issues - #1560
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
"no-undef": 0,
|
||||
"no-underscore-dangle": "off",
|
||||
"no-use-before-define": 0,
|
||||
"import/no-cycle": 0
|
||||
"import/no-cycle": 0,
|
||||
"import/no-useless-path-segments": 0
|
||||
},
|
||||
"globals": {
|
||||
"__DEV__": true,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Platform } from 'react-native';
|
||||
import { statics } from '.';
|
||||
import { statics } from './';
|
||||
import AdRequest from './AdRequest';
|
||||
import { SharedEventEmitter } from '../../utils/events';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import { nativeToJSError } from '../../utils';
|
||||
import type AdMob from '.';
|
||||
import type AdMob from './';
|
||||
|
||||
let subscriptions = [];
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { statics } from '.';
|
||||
import { statics } from './';
|
||||
import AdRequest from './AdRequest';
|
||||
import { SharedEventEmitter } from '../../utils/events';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import { nativeToJSError } from '../../utils';
|
||||
import type AdMob from '.';
|
||||
import type AdMob from './';
|
||||
|
||||
let subscriptions = [];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import { isAndroid, isIOS } from '../../utils';
|
||||
|
||||
import type Auth from '.';
|
||||
import type Auth from './';
|
||||
|
||||
/**
|
||||
* Interface representing an Auth instance's settings, currently used
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import INTERNALS from '../../utils/internals';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
|
||||
import type Auth from '.';
|
||||
import type Auth from './';
|
||||
import type {
|
||||
ActionCodeSettings,
|
||||
AuthCredential,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { typeOf } from '../../utils';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type Database from '.';
|
||||
import type Database from './';
|
||||
import type Reference from './Reference';
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
|
||||
import SyncTree from '../../utils/SyncTree';
|
||||
|
||||
import type Database from '.';
|
||||
import type Database from './';
|
||||
import type { DatabaseModifier, FirebaseError } from '../../types';
|
||||
|
||||
// track all event registrations by path
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
|
||||
import { getLogger } from '../../utils/log';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type Database from '.';
|
||||
import type Database from './';
|
||||
|
||||
let transactionId = 0;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import Query from './Query';
|
||||
import DocumentReference from './DocumentReference';
|
||||
import { firestoreAutoId } from '../../utils';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type {
|
||||
GetOptions,
|
||||
MetadataChanges,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import DocumentSnapshot from './DocumentSnapshot';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type { NativeDocumentChange } from './firestoreTypes.flow';
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ import { getNativeModule } from '../../utils/native';
|
||||
import { firestoreAutoId, isFunction, isObject } from '../../utils';
|
||||
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type {
|
||||
GetOptions,
|
||||
MetadataChanges,
|
||||
|
||||
@@ -8,7 +8,7 @@ import Path from './Path';
|
||||
import { isObject, deepGet } from '../../utils';
|
||||
import { parseNativeMap } from './utils/serialize';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type {
|
||||
NativeDocumentSnapshot,
|
||||
SnapshotMetadata,
|
||||
@@ -67,6 +67,6 @@ export default class DocumentSnapshot {
|
||||
return extractFieldPathData(this._data, fieldPath._segments);
|
||||
}
|
||||
|
||||
return deepGet(this._data, fieldPath, '.');
|
||||
return deepGet(this._data, fieldPath, './');
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { buildNativeArray, buildTypeMap } from './utils/serialize';
|
||||
import { firestoreAutoId, isFunction, isObject } from '../../utils';
|
||||
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type Path from './Path';
|
||||
import type {
|
||||
MetadataChanges,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import DocumentChange from './DocumentChange';
|
||||
import DocumentSnapshot from './DocumentSnapshot';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type {
|
||||
NativeDocumentChange,
|
||||
NativeDocumentSnapshot,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { parseUpdateArgs } from './utils';
|
||||
import { buildNativeMap } from './utils/serialize';
|
||||
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type { TransactionMeta } from './TransactionHandler';
|
||||
import type DocumentReference from './DocumentReference';
|
||||
import DocumentSnapshot from './DocumentSnapshot';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import Transaction from './Transaction';
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
|
||||
let transactionId = 0;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { buildNativeMap } from './utils/serialize';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
|
||||
import type DocumentReference from './DocumentReference';
|
||||
import type Firestore from '.';
|
||||
import type Firestore from './';
|
||||
import type { SetOptions } from './firestoreTypes.flow';
|
||||
|
||||
type DocumentWrite = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import AndroidChannel from './AndroidChannel';
|
||||
import AndroidChannelGroup from './AndroidChannelGroup';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
|
||||
import type Notifications from '.';
|
||||
import type Notifications from './';
|
||||
|
||||
export default class AndroidNotifications {
|
||||
_notifications: Notifications;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* IOSNotification representation wrapper
|
||||
*/
|
||||
import type Notification from './Notification';
|
||||
import type Notifications from '.';
|
||||
import type Notifications from './';
|
||||
import { type BackgroundFetchResultValue } from './IOSNotifications';
|
||||
import type {
|
||||
IOSAttachment,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
|
||||
import type Notifications from '.';
|
||||
import type Notifications from './';
|
||||
|
||||
export type BackgroundFetchResultValue = string;
|
||||
type BackgroundFetchResult = {
|
||||
|
||||
@@ -8,7 +8,7 @@ import IOSNotification from './IOSNotification';
|
||||
import { generatePushID, isObject } from '../../utils';
|
||||
|
||||
import type { NativeNotification } from './types';
|
||||
import type Notifications from '.';
|
||||
import type Notifications from './';
|
||||
|
||||
export type NotificationOpen = {|
|
||||
action: string,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Trace representation wrapper
|
||||
*/
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type PerformanceMonitoring from '.';
|
||||
import type PerformanceMonitoring from './';
|
||||
|
||||
export default class HttpMetric {
|
||||
url: string;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Trace representation wrapper
|
||||
*/
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type PerformanceMonitoring from '.';
|
||||
import type PerformanceMonitoring from './';
|
||||
|
||||
export default class Trace {
|
||||
identifier: string;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import ReferenceBase from '../../utils/ReferenceBase';
|
||||
import StorageTask, { UPLOAD_TASK, DOWNLOAD_TASK } from './task';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type Storage from '.';
|
||||
import type Storage from './';
|
||||
|
||||
/**
|
||||
* @url https://firebase.google.com/docs/reference/js/firebase.storage.Reference
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* @flow
|
||||
* UploadTask representation wrapper
|
||||
*/
|
||||
import { statics as StorageStatics } from '.';
|
||||
import { statics as StorageStatics } from './';
|
||||
import { isFunction } from '../../utils';
|
||||
import type Storage from '.';
|
||||
import type Storage from './';
|
||||
import type StorageReference from './reference';
|
||||
|
||||
export const UPLOAD_TASK = 'upload';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { NativeEventEmitter, NativeModules } from 'react-native';
|
||||
import { SharedEventEmitter } from './events';
|
||||
import DataSnapshot from '../modules/database/DataSnapshot';
|
||||
import DatabaseReference from '../modules/database/Reference';
|
||||
import { isString, nativeToJSError } from '.';
|
||||
import { isString, nativeToJSError } from './';
|
||||
|
||||
type Listener = DataSnapshot => any;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { NativeModules } from 'react-native';
|
||||
import App from '../modules/core/app';
|
||||
import INTERNALS from './internals';
|
||||
import { isAndroid, isObject, isString } from '.';
|
||||
import { isAndroid, isObject, isString } from './';
|
||||
|
||||
import type {
|
||||
FirebaseModule,
|
||||
|
||||
Reference in New Issue
Block a user