Add eslint-plugin-import

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-22 19:57:10 +04:00
parent 0e4ac296cb
commit aa5696b5d3
400 changed files with 1414 additions and 892 deletions

View File

@@ -1,4 +1,5 @@
import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema";
export const documentSchema = z.object({

View File

@@ -1,11 +1,13 @@
import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema";
import { graphql } from "relay-runtime";
import { useFragment } from "react-relay";
import type {
useRiskFormFragment$data,
useRiskFormFragment$key,
} from "/__generated__/core/useRiskFormFragment.graphql";
import { useFragment } from "react-relay";
import { useFormWithSchema } from "../useFormWithSchema";
const RiskFragment = graphql`
fragment useRiskFormFragment on Risk {

View File

@@ -1,12 +1,14 @@
import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema";
import { graphql } from "relay-runtime";
import { useFragment } from "react-relay";
import type { useVendorFormFragment$key } from "/__generated__/core/useVendorFormFragment.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
import { useTranslate } from "@probo/i18n";
import { useEffect, useMemo } from "react";
import type { useVendorFormFragment$key } from "/__generated__/core/useVendorFormFragment.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
import { useFormWithSchema } from "../useFormWithSchema";
const schema = z.object({
name: z.string().min(1, "Name is required"),
description: z.string().optional().nullable(),

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const assetsQuery = graphql`

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const auditsQuery = graphql`

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const ContinualImprovementsConnectionKey

View File

@@ -1,11 +1,13 @@
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { DocumentGraphDeleteMutation } from "/__generated__/core/DocumentGraphDeleteMutation.graphql";
import type { DocumentGraphSendSigningNotificationsMutation } from "/__generated__/core/DocumentGraphSendSigningNotificationsMutation.graphql";
import type { DocumentGraphDeleteDraftMutation } from "/__generated__/core/DocumentGraphDeleteDraftMutation.graphql";
import type { DocumentGraphBulkExportDocumentsMutation } from "/__generated__/core/DocumentGraphBulkExportDocumentsMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const documentsQuery = graphql`
query DocumentGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) {

View File

@@ -1,10 +1,11 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import { useCallback } from "react";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { useConfirm } from "@probo/ui";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const connectionListKey = "FrameworksListQuery_frameworks";
export const frameworksQuery = graphql`

View File

@@ -1,8 +1,10 @@
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { MeasureGraphDeleteMutation } from "/__generated__/core/MeasureGraphDeleteMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const measuresQuery = graphql`
query MeasureGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) @required(action: THROW) {

View File

@@ -1,9 +1,11 @@
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { MeetingGraphDeleteMutation } from "/__generated__/core/MeetingGraphDeleteMutation.graphql";
import type { MeetingGraphUpdateMutation } from "/__generated__/core/MeetingGraphUpdateMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const meetingsQuery = graphql`
query MeetingGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) {

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const NonconformitiesConnectionKey

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const ObligationsConnectionKey = "ObligationsPage_obligations";

View File

@@ -1,5 +1,4 @@
import { graphql } from "relay-runtime";
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql";
import {
useLazyLoadQuery,
useMutation,
@@ -8,10 +7,7 @@ import {
type PreloadedQuery,
} from "react-relay";
import { useMemo } from "react";
import type { PeopleGraphPaginatedQuery } from "/__generated__/core/PeopleGraphPaginatedQuery.graphql";
import type { PeopleGraphPaginatedFragment$key } from "/__generated__/core/PeopleGraphPaginatedFragment.graphql";
import { useConfirm, useToast } from "@probo/ui";
import type { PeopleGraphDeleteMutation } from "/__generated__/core/PeopleGraphDeleteMutation.graphql";
import {
promisifyMutation,
sprintf,
@@ -20,6 +16,11 @@ import {
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import type { PeopleGraphPaginatedQuery } from "/__generated__/core/PeopleGraphPaginatedQuery.graphql";
import type { PeopleGraphPaginatedFragment$key } from "/__generated__/core/PeopleGraphPaginatedFragment.graphql";
import type { PeopleGraphDeleteMutation } from "/__generated__/core/PeopleGraphDeleteMutation.graphql";
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql";
export const peopleQuery = graphql`
query PeopleGraphQuery($organizationId: ID!, $filter: PeopleFilter) {
organization: node(id: $organizationId) {

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const ProcessingActivitiesConnectionKey

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const RightsRequestsConnectionKey = "RightsRequestsPage_rightsRequests";

View File

@@ -1,15 +1,17 @@
import { graphql } from "relay-runtime";
import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
import {
usePreloadedQuery,
usePaginationFragment,
type PreloadedQuery,
} from "react-relay";
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
import type { RiskGraphListQuery } from "/__generated__/core/RiskGraphListQuery.graphql.ts";
import type { RiskGraphFragment$key } from "/__generated__/core/RiskGraphFragment.graphql.ts";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
const deleteRiskMutation = graphql`
mutation RiskGraphDeleteMutation(
$input: DeleteRiskInput!

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const SnapshotsConnectionKey = "SnapshotsPage_snapshots";

View File

@@ -1,6 +1,4 @@
import { graphql } from "relay-runtime";
import type { StateOfApplicabilityGraphPaginatedQuery } from "/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
import {
useMutation,
usePaginationFragment,
@@ -8,7 +6,6 @@ import {
type PreloadedQuery,
} from "react-relay";
import { useConfirm, useToast } from "@probo/ui";
import type { StateOfApplicabilityGraphDeleteMutation } from "/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
import {
promisifyMutation,
sprintf,
@@ -17,6 +14,10 @@ import {
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import type { StateOfApplicabilityGraphDeleteMutation } from "/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
import type { StateOfApplicabilityGraphPaginatedQuery } from "/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
export const paginatedStateOfApplicabilityQuery = graphql`
query StateOfApplicabilityGraphPaginatedQuery($organizationId: ID!) {
organization: node(id: $organizationId) {

View File

@@ -1,5 +1,5 @@
import { graphql } from "react-relay";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { TrustCenterAccessGraphQuery } from "/__generated__/core/TrustCenterAccessGraphQuery.graphql";
import type {
TrustCenterAccessGraph_accesses$data,

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterAuditGraphUpdateMutation } from "/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql";
export const trustCenterAuditUpdateMutation = graphql`

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterDocumentGraphUpdateMutation } from "/__generated__/core/TrustCenterDocumentGraphUpdateMutation.graphql";
export const trustCenterDocumentsQuery = graphql`

View File

@@ -1,4 +1,5 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
export const createTrustCenterFileMutation = graphql`

View File

@@ -1,4 +1,5 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterGraphUpdateMutation } from "/__generated__/core/TrustCenterGraphUpdateMutation.graphql";

View File

@@ -1,4 +1,5 @@
import { graphql } from "react-relay";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterReferenceGraphCreateMutation } from "/__generated__/core/TrustCenterReferenceGraphCreateMutation.graphql";
import type { TrustCenterReferenceGraphUpdateMutation } from "/__generated__/core/TrustCenterReferenceGraphUpdateMutation.graphql";

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterVendorGraphUpdateMutation } from "/__generated__/core/TrustCenterVendorGraphUpdateMutation.graphql";
export const trustCenterVendorUpdateMutation = graphql`

View File

@@ -1,14 +1,16 @@
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
import type { VendorGraphCreateMutation } from "/__generated__/core/VendorGraphCreateMutation.graphql.ts";
import type { VendorGraphDeleteMutation } from "/__generated__/core/VendorGraphDeleteMutation.graphql.ts";
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
import { useMutation, useLazyLoadQuery } from "react-relay";
import { useConfirm } from "@probo/ui";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMemo } from "react";
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
import type { VendorGraphDeleteMutation } from "/__generated__/core/VendorGraphDeleteMutation.graphql.ts";
import type { VendorGraphCreateMutation } from "/__generated__/core/VendorGraphCreateMutation.graphql.ts";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
const createVendorMutation = graphql`
mutation VendorGraphCreateMutation(
$input: CreateVendorInput!

View File

@@ -1,4 +1,5 @@
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { usePaginatedMeasuresQuery } from "/__generated__/core/usePaginatedMeasuresQuery.graphql";
import type { usePaginatedMeasuresFragment$key } from "/__generated__/core/usePaginatedMeasuresFragment.graphql";