pl-api: enable consistent-type-imports rule
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -16,14 +16,23 @@
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "none",
|
||||
"args": "after-used",
|
||||
"ignoreRestSiblings": true,
|
||||
"caughtErrors": "none",
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"no-shadow": "off"
|
||||
"no-shadow": "off",
|
||||
|
||||
"typescript/consistent-type-imports": [
|
||||
"error",
|
||||
{ "prefer": "type-imports", "fixStyle": "inline-type-imports" }
|
||||
],
|
||||
"typescript/consistent-type-exports": [
|
||||
"error",
|
||||
{ "fixMixedExportsWithInlineTypeSpecifier": true }
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"jsx-a11y": {
|
||||
|
||||
@ -37,13 +37,15 @@ import { trends } from './client/trends';
|
||||
import { utils } from './client/utils';
|
||||
import { ICESHRIMP_NET } from './features';
|
||||
|
||||
import type { Instance } from './entities/instance';
|
||||
|
||||
interface PlApiClientFullConstructorOpts extends PlApiClientConstructorOpts {
|
||||
/** Fetch instance after constructing */
|
||||
fetchInstance?: boolean;
|
||||
/** Abort signal which can be used to cancel the callbacks */
|
||||
fetchInstanceSignal?: AbortSignal;
|
||||
/** Executed after the initial instance fetch */
|
||||
onInstanceFetchSuccess?: (instance: import('./entities/instance').Instance) => void;
|
||||
onInstanceFetchSuccess?: (instance: Instance) => void;
|
||||
/** Executed when the initial instance fetch failed */
|
||||
onInstanceFetchError?: (error?: any) => void;
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import type {
|
||||
GetUnreadNotificationGroupCountParams,
|
||||
} from '../params/grouped-notifications';
|
||||
import type { PaginatedResponse } from '../responses';
|
||||
import type { notifications } from './notifications';
|
||||
|
||||
type EmptyObject = Record<string, never>;
|
||||
|
||||
@ -104,7 +105,7 @@ const _groupNotifications = (
|
||||
*/
|
||||
const groupedNotifications = (
|
||||
client: PlApiBaseClient & {
|
||||
notifications: ReturnType<typeof import('./notifications').notifications>;
|
||||
notifications: ReturnType<typeof notifications>;
|
||||
},
|
||||
) => {
|
||||
const category = {
|
||||
|
||||
@ -25,11 +25,12 @@ import type {
|
||||
UpdateBookmarkFolderParams,
|
||||
} from '../params/my-account';
|
||||
import type { PaginatedResponse } from '../responses';
|
||||
import type { accounts } from './accounts';
|
||||
|
||||
type EmptyObject = Record<string, never>;
|
||||
|
||||
const paginatedIceshrimpAccountsList = async <T>(
|
||||
client: PlApiBaseClient & { accounts: ReturnType<typeof import('./accounts').accounts> },
|
||||
client: PlApiBaseClient & { accounts: ReturnType<typeof accounts> },
|
||||
url: string,
|
||||
fn: (body: T) => Array<string>,
|
||||
): Promise<PaginatedResponse<Account>> => {
|
||||
@ -51,9 +52,7 @@ const paginatedIceshrimpAccountsList = async <T>(
|
||||
};
|
||||
};
|
||||
|
||||
const myAccount = (
|
||||
client: PlApiBaseClient & { accounts: ReturnType<typeof import('./accounts').accounts> },
|
||||
) => ({
|
||||
const myAccount = (client: PlApiBaseClient & { accounts: ReturnType<typeof accounts> }) => ({
|
||||
/**
|
||||
* View bookmarked statuses
|
||||
* Statuses the user has bookmarked.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PaginationParams, WithMutedParam } from './common';
|
||||
import type { PaginationParams, WithMutedParam } from './common';
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PaginationParams } from './common';
|
||||
import type { PaginationParams } from './common';
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PaginationParams } from './common';
|
||||
import type { PaginationParams } from './common';
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PaginationParams } from './common';
|
||||
import type { PaginationParams } from './common';
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { UpdateInteractionPoliciesParams } from './settings';
|
||||
|
||||
import type { PaginationParams } from './common';
|
||||
import type { UpdateInteractionPoliciesParams } from './settings';
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
|
||||
Reference in New Issue
Block a user