chore: introduce imports ordering (#5463)

This commit is contained in:
Vladislav Shkodin
2021-05-31 16:46:41 +02:00
committed by GitHub
parent 30f0e7b031
commit dbf2920254
212 changed files with 570 additions and 342 deletions

View File

@ -1,8 +1,9 @@
import type { AsyncLock } from './asyncLock';
import { asyncLock } from './asyncLock';
import unsentRequest from './unsentRequest';
import APIError from './APIError';
import type { AsyncLock } from './asyncLock';
export interface FetchError extends Error {
status: number;
}

View File

@ -1,7 +1,8 @@
import { parseLinkHeader, getAllResponses, getPathDepth, filterByExtension } from '../backendUtil';
import { oneLine } from 'common-tags';
import nock from 'nock';
import { parseLinkHeader, getAllResponses, getPathDepth, filterByExtension } from '../backendUtil';
describe('parseLinkHeader', () => {
it('should return the right rel urls', () => {
const url = 'https://api.github.com/resource';

View File

@ -1,6 +1,7 @@
import { flow, fromPairs } from 'lodash';
import { map } from 'lodash/fp';
import { fromJS } from 'immutable';
import unsentRequest from './unsentRequest';
import APIError from './APIError';

View File

@ -2,7 +2,9 @@
// Pointer file parsing
import { filter, flow, fromPairs, map } from 'lodash/fp';
import getBlobSHA from './getBlobSHA';
import type { AssetProxy } from './implementation';
export interface PointerFile {

View File

@ -1,10 +1,12 @@
import type { Semaphore } from 'semaphore';
import semaphore from 'semaphore';
import { unionBy, sortBy } from 'lodash';
import { basename } from './path';
import type { Semaphore } from 'semaphore';
import type Cursor from './Cursor';
import type { AsyncLock } from './asyncLock';
import type { FileMetadata } from './API';
import { basename } from './path';
export type DisplayURLObject = { id: string; path: string };

View File

@ -16,26 +16,7 @@ import {
} from './backendUtil';
import loadScript from './loadScript';
import getBlobSHA from './getBlobSHA';
import type { AsyncLock as AL } from './asyncLock';
import { asyncLock } from './asyncLock';
import type {
Implementation as I,
ImplementationEntry as IE,
UnpublishedEntryDiff as UED,
UnpublishedEntry as UE,
ImplementationMediaFile as IMF,
ImplementationFile as IF,
DisplayURLObject as DUO,
DisplayURL as DU,
Credentials as Cred,
User as U,
Entry as E,
PersistOptions as PO,
AssetProxy as AP,
Config as C,
UnpublishedEntryMediaFile as UEMF,
DataFile as DF,
} from './implementation';
import {
entriesByFiles,
entriesByFolder,
@ -46,7 +27,6 @@ import {
blobToFileObj,
allEntriesByFolder,
} from './implementation';
import type { FetchError as FE, ApiRequest as AR } from './API';
import {
readFile,
readFileMetadata,
@ -68,7 +48,6 @@ import {
branchFromContentKey,
contentKeyFromBranch,
} from './APIUtils';
import type { PointerFile as PF } from './git-lfs';
import {
createPointerFile,
getLargeMediaFilteredMediaFiles,
@ -77,6 +56,28 @@ import {
getPointerFileForMediaFileObj,
} from './git-lfs';
import type { PointerFile as PF } from './git-lfs';
import type { FetchError as FE, ApiRequest as AR } from './API';
import type {
Implementation as I,
ImplementationEntry as IE,
UnpublishedEntryDiff as UED,
UnpublishedEntry as UE,
ImplementationMediaFile as IMF,
ImplementationFile as IF,
DisplayURLObject as DUO,
DisplayURL as DU,
Credentials as Cred,
User as U,
Entry as E,
PersistOptions as PO,
AssetProxy as AP,
Config as C,
UnpublishedEntryMediaFile as UEMF,
DataFile as DF,
} from './implementation';
import type { AsyncLock as AL } from './asyncLock';
export type AsyncLock = AL;
export type Implementation = I;
export type ImplementationEntry = IE;