diff --git a/client/src/components/ErrorBoundary.tsx b/client/src/components/ErrorBoundary.tsx index 04828db..042935b 100644 --- a/client/src/components/ErrorBoundary.tsx +++ b/client/src/components/ErrorBoundary.tsx @@ -13,7 +13,7 @@ const withNavigate = }; // This is used twice so it has to be extracted into an interface -// eslint-disable-next-line no-restricted-syntax + interface ErrorBoundaryProps { children: React.ReactNode; buttonTitle?: string; diff --git a/client/src/utils/itemUtils.ts b/client/src/utils/itemUtils.ts index 3c28205..de0bf6d 100644 --- a/client/src/utils/itemUtils.ts +++ b/client/src/utils/itemUtils.ts @@ -82,7 +82,7 @@ export function getFieldValueForRole< if (Array.isArray(fieldValue)) { throw new Error('Unexpected array when getting field value'); } - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + return fieldValue.value satisfies ScalarTypeRuntimeType as ScalarTypeRuntimeType< FieldRoleToScalarType[Role & keyof FieldRoleToScalarType] >; diff --git a/client/src/utils/tree.test.ts b/client/src/utils/tree.test.ts index 06ecfc1..127be22 100644 --- a/client/src/utils/tree.test.ts +++ b/client/src/utils/tree.test.ts @@ -43,7 +43,7 @@ describe('Tree tests', () => { const filteredTree = tree.filterTree((node) => node.includes(filterString)); expect(filteredTree).not.toBeNull(); - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + const filteredTreeValues = convertTreeToList(filteredTree!); expect( filteredTreeValues diff --git a/client/src/utils/tree.ts b/client/src/utils/tree.ts index b0e0b44..5e573ce 100644 --- a/client/src/utils/tree.ts +++ b/client/src/utils/tree.ts @@ -89,7 +89,7 @@ export class Tree { size() { let size = 0; - // eslint-disable-next-line @typescript-eslint/no-unused-vars + for (const _ of this.preOrderTraversal()) { size++; } diff --git a/client/src/webpages/App.tsx b/client/src/webpages/App.tsx index cc1d547..9b87bbe 100644 --- a/client/src/webpages/App.tsx +++ b/client/src/webpages/App.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-key */ import React, { Suspense } from 'react'; import { createBrowserRouter, @@ -15,11 +14,16 @@ import { useGQLUserAndOrgQuery } from '../graphql/generated'; import { RequireAuth, RequireLoggedOut } from '../routing/auth'; import AwaitingApproval from './auth/AwaitingApproval'; import RejectedByAdmin from './auth/RejectedByAdmin'; + import './dashboard/Dashboard.css'; const Login = React.lazy(async () => import('./auth/Login')); -const ForgotPassword = React.lazy(async () => import('./auth/forgot_password/ForgotPassword')); -const ResetPassword = React.lazy(async () => import('./auth/forgot_password/ResetPassword')); +const ForgotPassword = React.lazy( + async () => import('./auth/forgot_password/ForgotPassword'), +); +const ResetPassword = React.lazy( + async () => import('./auth/forgot_password/ResetPassword'), +); const SignUp = React.lazy(async () => import('./auth/SignUp')); const LoginSSO = React.lazy(async () => import('./auth/LoginSSO')); /** @@ -37,16 +41,16 @@ const LoginSSO = React.lazy(async () => import('./auth/LoginSSO')); function RootRedirect() { const { loading, data } = useGQLUserAndOrgQuery(); - + if (loading) { return ; } - + // If user is logged in, redirect to dashboard, otherwise to login if (data?.me) { return ; } - + return ; } diff --git a/client/src/webpages/dashboard/item_types/ItemTypeRequestCodeSamples.tsx b/client/src/webpages/dashboard/item_types/ItemTypeRequestCodeSamples.tsx index d0f2c66..e41e415 100644 --- a/client/src/webpages/dashboard/item_types/ItemTypeRequestCodeSamples.tsx +++ b/client/src/webpages/dashboard/item_types/ItemTypeRequestCodeSamples.tsx @@ -99,7 +99,7 @@ export default function ItemTypeRequestCodeSamples(props: { }} style={{ ...atelierSulphurpoolLight, - // eslint-disable-next-line id-denylist + 'hljs-string': { color: '#75787B', }, diff --git a/client/src/webpages/dashboard/mrt/queue_routing/condition/matching_values/ManualReviewQueueRuleConditionMediaMatchingValues.tsx b/client/src/webpages/dashboard/mrt/queue_routing/condition/matching_values/ManualReviewQueueRuleConditionMediaMatchingValues.tsx index 8d290ac..a0f7783 100644 --- a/client/src/webpages/dashboard/mrt/queue_routing/condition/matching_values/ManualReviewQueueRuleConditionMediaMatchingValues.tsx +++ b/client/src/webpages/dashboard/mrt/queue_routing/condition/matching_values/ManualReviewQueueRuleConditionMediaMatchingValues.tsx @@ -1,8 +1,8 @@ -/* eslint-disable no-console */ import { Select } from 'antd'; import ComponentLoading from '../../../../../../components/common/ComponentLoading'; import { selectFilterByLabelOption } from '@/webpages/dashboard/components/antDesignUtils'; + import { useGQLHashBanksQuery } from '../../../../../../graphql/generated'; import { RuleFormLeafCondition } from '../../../../rules/types'; import { ManualReviewQueueRoutingStaticTokenField } from '../../ManualReviewQueueRoutingStaticField'; @@ -15,7 +15,12 @@ export default function ManualReviewQueueRuleConditionMediaMatchingValues(props: onUpdateSelectedBankIds(imageBankIds: readonly string[]): void; allConditions?: RuleFormLeafCondition[]; }) { - const { condition, editing, onUpdateSelectedBankIds, allConditions = [] } = props; + const { + condition, + editing, + onUpdateSelectedBankIds, + allConditions = [], + } = props; const { loading, error, data } = useGQLHashBanksQuery(); const hashBanks = data?.hashBanks ?? []; @@ -24,7 +29,7 @@ export default function ManualReviewQueueRuleConditionMediaMatchingValues(props: const selectedBankIds = new Set( allConditions .filter((c) => c !== condition) // Exclude current condition by reference - .flatMap((c) => c.matchingValues?.imageBankIds ?? []) + .flatMap((c) => c.matchingValues?.imageBankIds ?? []), ); if (loading) { @@ -48,9 +53,9 @@ export default function ManualReviewQueueRuleConditionMediaMatchingValues(props: dropdownMatchSelectWidth={false} > {hashBanks.map((bank) => ( -