Fix formatting and React hook dependency lint errors

Fix max-len violations by breaking long lines across multiple
lines. Fix react-hooks/exhaustive-deps by adding missing deps
and removing unnecessary ones. Remove stale eslint-disable
comments in DataTable stories.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-15 13:32:54 +01:00
parent 13ca50df68
commit 43d6ab38fb
7 changed files with 32 additions and 15 deletions

View File

@@ -111,7 +111,7 @@ export default function ActivateAccountPage() {
}); });
}, },
}); });
}, [__, toast, activateAccount, navigate, safeContinueUrl, searchParams]); }, [__, toast, activateAccount, navigate, safeContinueUrl]);
useEffect(() => { useEffect(() => {
const token = searchParams.get("token"); const token = searchParams.get("token");

View File

@@ -80,13 +80,14 @@ export function CompliancePageMailingListPage(props: {
const [replyTo, setReplyTo] = useState(mailingList?.replyTo ?? ""); const [replyTo, setReplyTo] = useState(mailingList?.replyTo ?? "");
const [updateMailingList, isUpdating] = useMutationWithToasts<CompliancePageMailingListPage_updateMailingListMutation>( const [updateMailingList, isUpdating]
updateMailingListMutation, = useMutationWithToasts<CompliancePageMailingListPage_updateMailingListMutation>(
{ updateMailingListMutation,
successMessage: __("Mailing list updated successfully"), {
errorMessage: __("Failed to update mailing list"), successMessage: __("Mailing list updated successfully"),
}, errorMessage: __("Failed to update mailing list"),
); },
);
const handleSaveReplyTo = () => { const handleSaveReplyTo = () => {
if (!mailingListId) return; if (!mailingListId) return;

View File

@@ -245,7 +245,10 @@ function ExternalUrlRow(props: {
onDragEnd: () => void; onDragEnd: () => void;
onEdit: (node: UrlNode) => void; onEdit: (node: UrlNode) => void;
}) { }) {
const { node, canEdit, connectionId, isDragging, isDropTarget, onDragStart, onDragOver, onDrop, onDragEnd, onEdit } = props; const {
node, canEdit, connectionId, isDragging, isDropTarget,
onDragStart, onDragOver, onDrop, onDragEnd, onEdit,
} = props;
const { __ } = useTranslate(); const { __ } = useTranslate();
const [isMouseDown, setIsMouseDown] = useState(false); const [isMouseDown, setIsMouseDown] = useState(false);
@@ -361,7 +364,14 @@ export function CompliancePageExternalUrlsSection(props: {
const draggedId = draggedEdge.node.id; const draggedId = draggedEdge.node.id;
await updateRank({ await updateRank({
variables: { input: { id: draggedId, name: draggedEdge.node.name, url: draggedEdge.node.url, rank: targetRank } }, variables: {
input: {
id: draggedId,
name: draggedEdge.node.name,
url: draggedEdge.node.url,
rank: targetRank,
},
},
updater: (store) => { updater: (store) => {
const connection = store.get(connectionId); const connection = store.get(connectionId);
if (!connection) return; if (!connection) return;

View File

@@ -147,7 +147,11 @@ export function DocumentLayout(props: { queryRef: PreloadedQuery<DocumentLayoutQ
</Button> </Button>
)} )}
<DocumentVersionsDropdown /> <DocumentVersionsDropdown />
<DocumentActionsDropdownn documentFragmentRef={document} versionFragmentRef={currentVersion} onRefetch={onRefetch} /> <DocumentActionsDropdownn
documentFragmentRef={document}
versionFragmentRef={currentVersion}
onRefetch={onRefetch}
/>
</div> </div>
</div> </div>

View File

@@ -368,7 +368,7 @@ function WebhookEventsDialog({
useEffect(() => { useEffect(() => {
void loadEvents(); void loadEvents();
dialogRef.current?.open(); dialogRef.current?.open();
}, [loadEvents]); }, [loadEvents, dialogRef]);
return ( return (
<Dialog <Dialog

View File

@@ -465,7 +465,10 @@ type AddApplicabilityStatementDialogProps = {
onClose?: () => void; onClose?: () => void;
}; };
export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatementDialogRef, AddApplicabilityStatementDialogProps>( export const AddApplicabilityStatementDialog = forwardRef<
AddApplicabilityStatementDialogRef,
AddApplicabilityStatementDialogProps
>(
({ onClose }, ref) => { ({ onClose }, ref) => {
const { __ } = useTranslate(); const { __ } = useTranslate();
const dialogRef = useDialogRef(); const dialogRef = useDialogRef();

View File

@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react"; import type { Meta, StoryObj } from "@storybook/react";
import { type FC, Fragment, useState } from "react"; import { type FC, Fragment, useState } from "react";
// eslint-disable-next-line import-x/no-unresolved -- storybook v10 subpath export
import { fn } from "storybook/test"; import { fn } from "storybook/test";
import { Badge } from "../../Atoms/Badge/Badge"; import { Badge } from "../../Atoms/Badge/Badge";
@@ -16,7 +15,7 @@ export default {
title: "Atoms/DataTable/Cells", title: "Atoms/DataTable/Cells",
component: Fragment as Component, component: Fragment as Component,
argTypes: {}, argTypes: {},
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- fn type unresolvable due to storybook/test subpath
args: { onUpdate: fn() as (key: string, value: unknown) => void }, args: { onUpdate: fn() as (key: string, value: unknown) => void },
} satisfies Meta<Component>; } satisfies Meta<Component>;