[js] add workaround for module-resolver issues - #1560

This commit is contained in:
Salakar
2018-10-15 01:26:35 +01:00
parent 11c39503a0
commit ffc2eca6da
27 changed files with 32 additions and 31 deletions

View File

@@ -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,

View File

@@ -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 = [];

View File

@@ -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 = [];

View File

@@ -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

View File

@@ -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,

View File

@@ -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';
/**

View File

@@ -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

View File

@@ -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;

View File

@@ -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,

View File

@@ -4,7 +4,7 @@
*/
import DocumentSnapshot from './DocumentSnapshot';
import type Firestore from '.';
import type Firestore from './';
import type { NativeDocumentChange } from './firestoreTypes.flow';
/**

View File

@@ -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,

View File

@@ -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, './');
};
}

View File

@@ -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,

View File

@@ -5,7 +5,7 @@
import DocumentChange from './DocumentChange';
import DocumentSnapshot from './DocumentSnapshot';
import type Firestore from '.';
import type Firestore from './';
import type {
NativeDocumentChange,
NativeDocumentSnapshot,

View File

@@ -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';

View File

@@ -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;

View File

@@ -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 = {

View File

@@ -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;

View File

@@ -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,

View File

@@ -1,6 +1,6 @@
import { getNativeModule } from '../../utils/native';
import type Notifications from '.';
import type Notifications from './';
export type BackgroundFetchResultValue = string;
type BackgroundFetchResult = {

View File

@@ -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,

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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';

View File

@@ -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;

View File

@@ -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,