Re-add prettier (#13812)

Re add prettier in eslint.configs
This commit is contained in:
Charles Bochet
2025-08-11 14:10:04 +02:00
committed by GitHub
parent c8d8fb20c9
commit b14063fe06
168 changed files with 675 additions and 352 deletions
@@ -1,5 +1,8 @@
import { createComponentState } from '@/ui/utilities/state/component-state/utils/createComponentState';
import { type WorkflowAction, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowAction,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { WorkflowVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowVisualizerComponentInstanceContext';
export const flowComponentState = createComponentState<
@@ -1,4 +1,7 @@
import { type WorkflowAction, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowAction,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
import { getStepDefinitionOrThrow } from '../getStepDefinitionOrThrow';
@@ -1,4 +1,7 @@
import { type WorkflowAction, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowAction,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { findStepPosition } from '@/workflow/utils/findStepPosition';
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
import { isDefined } from 'twenty-shared/utils';
@@ -1,6 +1,9 @@
import { useEdgeSelected } from '@/workflow/workflow-diagram/hooks/useEdgeSelected';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { type OnSelectionChangeParams, useOnSelectionChange } from '@xyflow/react';
import {
type OnSelectionChangeParams,
useOnSelectionChange,
} from '@xyflow/react';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
import { FeatureFlagKey } from '~/generated/graphql';
@@ -13,7 +13,11 @@ import { useOpenWorkflowEditFilterInCommandMenu } from '@/workflow/workflow-diag
import { useStartNodeCreation } from '@/workflow/workflow-diagram/hooks/useStartNodeCreation';
import { type WorkflowDiagramEdge } from '@/workflow/workflow-diagram/types/WorkflowDiagram';
import { useCreateStep } from '@/workflow/workflow-steps/hooks/useCreateStep';
import { EdgeLabelRenderer, type EdgeProps, getBezierPath } from '@xyflow/react';
import {
EdgeLabelRenderer,
type EdgeProps,
getBezierPath,
} from '@xyflow/react';
import { useContext } from 'react';
import { useSetRecoilState } from 'recoil';
import { isDefined } from 'twenty-shared/utils';
@@ -30,7 +30,11 @@ import { useDeleteStep } from '@/workflow/workflow-steps/hooks/useDeleteStep';
import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { isNonEmptyString } from '@sniptt/guards';
import { EdgeLabelRenderer, type EdgeProps, getBezierPath } from '@xyflow/react';
import {
EdgeLabelRenderer,
type EdgeProps,
getBezierPath,
} from '@xyflow/react';
import { useContext } from 'react';
import { useSetRecoilState } from 'recoil';
import { isDefined } from 'twenty-shared/utils';
@@ -15,7 +15,11 @@ import { getWorkflowDiagramNodeSelectedColors } from '@/workflow/workflow-diagra
import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { isNonEmptyString } from '@sniptt/guards';
import { EdgeLabelRenderer, type EdgeProps, getBezierPath } from '@xyflow/react';
import {
EdgeLabelRenderer,
type EdgeProps,
getBezierPath,
} from '@xyflow/react';
import { isDefined } from 'twenty-shared/utils';
import { IconFilter } from 'twenty-ui/display';
import { IconButtonGroup } from 'twenty-ui/input';
@@ -1,7 +1,11 @@
import { WORKFLOW_DIAGRAM_EDGE_OPTIONS_CLICK_OUTSIDE_ID } from '@/workflow/workflow-diagram/constants/WorkflowDiagramEdgeOptionsClickOutsideId';
import { useStartNodeCreation } from '@/workflow/workflow-diagram/hooks/useStartNodeCreation';
import { type WorkflowDiagramEdge } from '@/workflow/workflow-diagram/types/WorkflowDiagram';
import { EdgeLabelRenderer, type EdgeProps, getBezierPath } from '@xyflow/react';
import {
EdgeLabelRenderer,
type EdgeProps,
getBezierPath,
} from '@xyflow/react';
import { IconPlus } from 'twenty-ui/display';
import { WorkflowDiagramEdgeV2Container } from '@/workflow/workflow-diagram/components/WorkflowDiagramEdgeV2Container';
import { WorkflowDiagramEdgeV2VisibilityContainer } from '@/workflow/workflow-diagram/components/WorkflowDiagramEdgeV2VisibilityContainer';
@@ -1,4 +1,7 @@
import { type WorkflowStep, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowStep,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { generateWorkflowDiagram } from '../generateWorkflowDiagram';
describe('generateWorkflowDiagram', () => {
@@ -1,4 +1,7 @@
import { type WorkflowStep, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowStep,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { FieldMetadataType } from 'twenty-shared/types';
import { StepStatus, type WorkflowRunStepInfos } from 'twenty-shared/workflow';
import { getUuidV4Mock } from '~/testing/utils/getUuidV4Mock';
@@ -1,4 +1,7 @@
import { type WorkflowStep, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowStep,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { FIRST_NODE_POSITION } from '@/workflow/workflow-diagram/constants/FirstNodePosition';
import { VERTICAL_DISTANCE_BETWEEN_TWO_NODES } from '@/workflow/workflow-diagram/constants/VerticalDistanceBetweenTwoNodes';
import { WORKFLOW_VISUALIZER_EDGE_DEFAULT_CONFIGURATION } from '@/workflow/workflow-diagram/constants/WorkflowVisualizerEdgeDefaultConfiguration';
@@ -1,4 +1,7 @@
import { type WorkflowStep, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowStep,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import {
type WorkflowDiagramEdgeData,
type WorkflowDiagramEdgeType,
@@ -1,4 +1,7 @@
import { type WorkflowAction, type WorkflowTrigger } from '@/workflow/types/Workflow';
import {
type WorkflowAction,
type WorkflowTrigger,
} from '@/workflow/types/Workflow';
import { getStepDefinitionOrThrow } from '@/workflow/utils/getStepDefinitionOrThrow';
import { WorkflowEditActionAiAgent } from '@/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowEditActionAiAgent';
import { WorkflowActionServerlessFunction } from '@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowActionServerlessFunction';
@@ -5,7 +5,10 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi
import { useGetRecordFromCache } from '@/object-record/cache/hooks/useGetRecordFromCache';
import { updateRecordFromCache } from '@/object-record/cache/utils/updateRecordFromCache';
import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';
import { type WorkflowAction, type WorkflowVersion } from '@/workflow/types/Workflow';
import {
type WorkflowAction,
type WorkflowVersion,
} from '@/workflow/types/Workflow';
import { isDefined } from 'twenty-shared/utils';
import { type WorkflowVersionStepChanges } from '~/generated/graphql';
@@ -1,4 +1,4 @@
import { expect , fn, userEvent, within } from '@storybook/test';
import { expect, fn, userEvent, within } from '@storybook/test';
import { type Meta, type StoryObj } from '@storybook/react';
import { ComponentDecorator } from 'twenty-ui/testing';
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
@@ -6,7 +6,10 @@ import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/workflow-ac
import styled from '@emotion/styled';
import { useContext } from 'react';
import { type StepFilterGroup, StepLogicalOperator } from 'twenty-shared/src/types';
import {
type StepFilterGroup,
StepLogicalOperator,
} from 'twenty-shared/src/types';
import { capitalize } from 'twenty-shared/utils';
const StyledText = styled.div`
@@ -6,7 +6,10 @@ import { useUpsertStepFilterSettings } from '@/workflow/workflow-steps/workflow-
import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/workflow-actions/filter-action/states/context/WorkflowStepFilterContext';
import { getViewFilterOperands } from '@/workflow/workflow-steps/workflow-actions/filter-action/utils/getStepFilterOperands';
import { useContext } from 'react';
import { type StepFilter, type ViewFilterOperand } from 'twenty-shared/src/types';
import {
type StepFilter,
type ViewFilterOperand,
} from 'twenty-shared/src/types';
type WorkflowStepFilterOperandSelectProps = {
stepFilter: StepFilter;
@@ -2,10 +2,7 @@ import { type WorkflowFormAction } from '@/workflow/types/Workflow';
import { type Meta, type StoryObj } from '@storybook/react';
import { expect, within } from '@storybook/test';
import { FieldMetadataType } from 'twenty-shared/types';
import {
ComponentDecorator,
RouterDecorator
} from 'twenty-ui/testing';
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
@@ -41,6 +41,9 @@ export type HttpRequestFormData = {
};
export {
DEFAULT_HTTP_REQUEST_OUTPUT_VALUE, DEFAULT_JSON_BODY_PLACEHOLDER, HTTP_METHODS, JSON_RESPONSE_PLACEHOLDER, METHODS_WITH_BODY
DEFAULT_HTTP_REQUEST_OUTPUT_VALUE,
DEFAULT_JSON_BODY_PLACEHOLDER,
HTTP_METHODS,
JSON_RESPONSE_PLACEHOLDER,
METHODS_WITH_BODY,
};
@@ -2,7 +2,10 @@ import { type WorkflowHttpRequestAction } from '@/workflow/types/Workflow';
import { isMethodWithBody } from '@/workflow/workflow-steps/workflow-actions/http-request-action/utils/isMethodWithBody';
import { useState } from 'react';
import { useDebouncedCallback } from 'use-debounce';
import { type HttpRequestBody, type HttpRequestFormData } from '../constants/HttpRequest';
import {
type HttpRequestBody,
type HttpRequestFormData,
} from '../constants/HttpRequest';
export type UseHttpRequestFormParams = {
action: WorkflowHttpRequestAction;
@@ -1,5 +1,9 @@
import { type WorkflowManualTriggerAvailability } from '@/workflow/types/Workflow';
import { IconCheckbox, type IconComponent, IconSquare } from 'twenty-ui/display';
import {
IconCheckbox,
type IconComponent,
IconSquare,
} from 'twenty-ui/display';
export const MANUAL_TRIGGER_AVAILABILITY_OPTIONS: Array<{
label: string;
@@ -1,4 +1,8 @@
import { type IconComponent, IconHttpGet, IconHttpPost } from 'twenty-ui/display';
import {
type IconComponent,
IconHttpGet,
IconHttpPost,
} from 'twenty-ui/display';
export type WebhookHttpMethods = 'GET' | 'POST';
export const WEBHOOK_TRIGGER_HTTP_METHOD_OPTIONS: Array<{