From 78142308ae500651fdf8d15244ebe54c7378a5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Mon, 27 Oct 2025 12:40:37 +0100 Subject: [PATCH] pl-fe: lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/actions/auth.ts | 4 ++-- .../pl-fe/src/api/hooks/admin/use-verify.ts | 2 +- packages/pl-fe/src/reducers/auth.ts | 3 +-- packages/pl-fe/src/utils/accounts.test.ts | 17 ----------------- 4 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 packages/pl-fe/src/utils/accounts.test.ts diff --git a/packages/pl-fe/src/actions/auth.ts b/packages/pl-fe/src/actions/auth.ts index d2e4d125f..ec210935b 100644 --- a/packages/pl-fe/src/actions/auth.ts +++ b/packages/pl-fe/src/actions/auth.ts @@ -7,11 +7,12 @@ * @see module:pl-fe/actions/security */ import { + type Account, credentialAccountSchema, - PlApiClient, type CreateAccountParams, type CredentialAccount, type CredentialApplication, + PlApiClient, type Token, } from 'pl-api'; import { defineMessages } from 'react-intl'; @@ -37,7 +38,6 @@ import { type PlfeResponse, getClient } from '../api'; import { importEntities } from './importer'; -import type { Account } from 'pl-api'; import type { AppDispatch, RootState } from 'pl-fe/store'; const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT' as const; diff --git a/packages/pl-fe/src/api/hooks/admin/use-verify.ts b/packages/pl-fe/src/api/hooks/admin/use-verify.ts index 988e265e4..797d6b866 100644 --- a/packages/pl-fe/src/api/hooks/admin/use-verify.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-verify.ts @@ -1,8 +1,8 @@ import { useTransaction } from 'pl-fe/entity-store/hooks/use-transaction'; import { useClient } from 'pl-fe/hooks/use-client'; -import type { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; import type { Account } from 'pl-api'; +import type { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; const useVerify = () => { const client = useClient(); diff --git a/packages/pl-fe/src/reducers/auth.ts b/packages/pl-fe/src/reducers/auth.ts index 1c20329b2..57c87bfe6 100644 --- a/packages/pl-fe/src/reducers/auth.ts +++ b/packages/pl-fe/src/reducers/auth.ts @@ -1,6 +1,6 @@ import trim from 'lodash/trim'; import { create, Draft } from 'mutative'; -import { applicationSchema, instanceSchema, PlApiClient, tokenSchema, type CredentialAccount, type CredentialApplication, type Token } from 'pl-api'; +import { type Account as AccountEntity, applicationSchema, instanceSchema, PlApiClient, tokenSchema, type CredentialAccount, type CredentialApplication, type Token } from 'pl-api'; import * as v from 'valibot'; import { decodeFromMarkup, MASTODON_PRELOAD_IMPORT, pleromaDecoder, type PreloadAction } from 'pl-fe/actions/preload'; @@ -22,7 +22,6 @@ import { import { ME_FETCH_SKIP, type MeAction } from '../actions/me'; import type { PlfeResponse } from 'pl-fe/api'; -import type { Account as AccountEntity } from 'pl-api'; const instance = (() => { try { diff --git a/packages/pl-fe/src/utils/accounts.test.ts b/packages/pl-fe/src/utils/accounts.test.ts deleted file mode 100644 index 4177556b9..000000000 --- a/packages/pl-fe/src/utils/accounts.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AccountRecord } from 'pl-fe/normalizers/account'; - -import { - getDomain, -} from './accounts'; - -import type { ReducerAccount } from 'pl-fe/reducers/accounts'; - -describe('getDomain', () => { - const account = AccountRecord({ - acct: 'alice', - url: 'https://party.com/users/alice', - }) as ReducerAccount; - it('returns the domain', () => { - expect(getDomain(account)).toEqual('party.com'); - }); -});