Fix lint findings on upgraded console pages

Wrap the usePreloadedQuery calls whose explicit type arguments pushed
them past the 120-character limit, and merge the two duplicate
@probo/helpers imports in FrameworkControlPage into one. These were
flagged by reviewdog on the dependency-upgrade PR.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-19 14:31:30 +02:00
parent abb641111a
commit 4348c409a1
5 changed files with 17 additions and 5 deletions

View File

@@ -70,7 +70,10 @@ export default function CreateCsvAccessReviewSourcePage({
usePageTitle(__("Add CSV Access Source"));
const { organization } = usePreloadedQuery<CreateCsvAccessReviewSourcePageQuery>(createCsvAccessReviewSourcePageQuery, queryRef);
const { organization } = usePreloadedQuery<CreateCsvAccessReviewSourcePageQuery>(
createCsvAccessReviewSourcePageQuery,
queryRef,
);
if (organization.__typename !== "Organization") {
throw new Error("Organization not found");
}

View File

@@ -102,7 +102,10 @@ export default function AccessReviewSourcesTab({ queryRef }: Props) {
const [searchParams, setSearchParams] = useSearchParams();
const processedConnectorIdRef = useRef<string | null>(null);
const { organization, accessReviewDrivers } = usePreloadedQuery<AccessReviewSourcesTabQuery>(accessReviewSourcesTabQuery, queryRef);
const { organization, accessReviewDrivers } = usePreloadedQuery<AccessReviewSourcesTabQuery>(
accessReviewSourcesTabQuery,
queryRef,
);
if (organization.__typename !== "Organization") {
throw new Error("Organization not found");
}

View File

@@ -15,8 +15,8 @@
import {
formatError,
getControlMaturityLevelLabel,
promisifyMutation,
} from "@probo/helpers";
import { promisifyMutation } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
ActionDropdown,

View File

@@ -138,7 +138,10 @@ export default function StatementOfApplicabilityDetailPage(props: Props) {
statementOfApplicabilityId: string;
}>();
const organizationId = useOrganizationId();
const data = usePreloadedQuery<StatementOfApplicabilityDetailPageQuery>(statementOfApplicabilityDetailPageQuery, props.queryRef);
const data = usePreloadedQuery<StatementOfApplicabilityDetailPageQuery>(
statementOfApplicabilityDetailPageQuery,
props.queryRef,
);
const statementOfApplicability = data.node;
const { __ } = useTranslate();
const navigate = useNavigate();

View File

@@ -92,7 +92,10 @@ export default function StatementsOfApplicabilityPage({
usePageTitle(__("Statements of Applicability"));
const { organization } = usePreloadedQuery<StatementsOfApplicabilityPageQuery>(statementsOfApplicabilityPageQuery, queryRef);
const { organization } = usePreloadedQuery<StatementsOfApplicabilityPageQuery>(
statementsOfApplicabilityPageQuery,
queryRef,
);
if (organization.__typename !== "Organization") {
throw new Error("Organization not found");