Skip to content

Commit

Permalink
chore(linter): Fix safe lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hartra344 committed Mar 24, 2024
1 parent af341b3 commit d37e304
Show file tree
Hide file tree
Showing 53 changed files with 256 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ICommandBarItemProps } from '@fluentui/react/lib/CommandBar';
import { CommandBar } from '@fluentui/react/lib/CommandBar';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
import type { ILoggerService } from '@microsoft/logic-apps-shared';
import { LogEntryLevel, LoggerService } from '@microsoft/logic-apps-shared';
import { LogEntryLevel, LoggerService, isNullOrEmpty, RUN_AFTER_COLORS } from '@microsoft/logic-apps-shared';
import type { RootState, Workflow } from '@microsoft/logic-apps-designer';
import {
store as DesignerStore,
Expand All @@ -20,7 +20,6 @@ import {
openPanel,
useNodesInitialized,
} from '@microsoft/logic-apps-designer';
import { isNullOrEmpty, RUN_AFTER_COLORS } from '@microsoft/logic-apps-shared';
import { useMemo } from 'react';
import { useMutation } from 'react-query';
import { useDispatch, useSelector } from 'react-redux';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ import {
StandardOperationManifestService,
StandardRunService,
StandardSearchService,
clone,
equals,
guid,
isArmResourceId,
optional,
} from '@microsoft/logic-apps-shared';
import type { ContentType, IWorkflowService } from '@microsoft/logic-apps-shared';
import type { ContentType, IWorkflowService, LogicAppsV2 } from '@microsoft/logic-apps-shared';
import type { Workflow } from '@microsoft/logic-apps-designer';
import {
DesignerProvider,
Expand All @@ -46,8 +51,6 @@ import {
serializeBJSWorkflow,
store as DesignerStore,
} from '@microsoft/logic-apps-designer';
import { clone, equals, guid, isArmResourceId, optional } from '@microsoft/logic-apps-shared';
import type { LogicAppsV2 } from '@microsoft/logic-apps-shared';
import axios from 'axios';
import isEqual from 'lodash.isequal';
import { useEffect, useMemo, useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import {
ConsumptionSearchService,
BaseChatbotService,
ConsumptionRunService,
guid,
startsWith,
} from '@microsoft/logic-apps-shared';
import type { Workflow } from '@microsoft/logic-apps-designer';
import {
Expand All @@ -47,7 +49,6 @@ import {
serializeBJSWorkflow,
store as DesignerStore,
} from '@microsoft/logic-apps-designer';
import { guid, startsWith } from '@microsoft/logic-apps-shared';
import * as React from 'react';
import { useDispatch, useSelector } from 'react-redux';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import {
StandardRunService,
ConsumptionOperationManifestService,
ConsumptionConnectionService,
ResourceIdentityType,
} from '@microsoft/logic-apps-shared';
import type { ContentType } from '@microsoft/logic-apps-shared';
import { DesignerProvider, BJSWorkflowProvider, Designer } from '@microsoft/logic-apps-designer';
import { ResourceIdentityType } from '@microsoft/logic-apps-shared';
import { useSelector } from 'react-redux';

const httpClient = new HttpClient();
Expand Down
3 changes: 1 addition & 2 deletions apps/vs-code-react/src/app/designer/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import './app.less';
import { getDesignerServices } from './servicesHelper';
import { convertConnectionsDataToReferences } from './utilities/workflow';
import { Spinner, SpinnerSize, Text } from '@fluentui/react';
import type { ConnectionCreationInfo } from '@microsoft/logic-apps-shared';
import type { ConnectionCreationInfo, LogicAppsV2 } from '@microsoft/logic-apps-shared';
import type { ConnectionReferences } from '@microsoft/logic-apps-designer';
import { DesignerProvider, BJSWorkflowProvider, Designer, getTheme, useThemeObserver } from '@microsoft/logic-apps-designer';
import type { LogicAppsV2 } from '@microsoft/logic-apps-shared';
import { isEmptyString, Theme } from '@microsoft/logic-apps-shared';
import type { FileSystemConnectionInfo, StandardApp } from '@microsoft/vscode-extension';
import { ExtensionCommand } from '@microsoft/vscode-extension';
Expand Down
5 changes: 3 additions & 2 deletions apps/vs-code-react/src/app/designer/servicesHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ import {
BaseApiManagementService,
BaseFunctionService,
BaseAppServiceService,
HTTP_METHODS,
clone,
} from '@microsoft/logic-apps-shared';
import type {
ApiHubServiceDetails,
ConnectionCreationInfo,
ContentType,
IHostService,
IWorkflowService,
ManagedIdentity,
} from '@microsoft/logic-apps-shared';
import type { ManagedIdentity } from '@microsoft/logic-apps-shared';
import { HTTP_METHODS, clone } from '@microsoft/logic-apps-shared';
import type { ConnectionAndAppSetting, ConnectionsData, IDesignerPanelMetadata } from '@microsoft/vscode-extension';
import { ExtensionCommand, HttpClient } from '@microsoft/vscode-extension';
import type { QueryClient } from 'react-query';
Expand Down
3 changes: 1 addition & 2 deletions apps/vs-code-react/src/run-service/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { InitializePayload, Status } from '../state/WorkflowSlice';
import type { ApiHubServiceDetails } from '@microsoft/logic-apps-shared';
import type { SchemaType } from '@microsoft/logic-apps-shared';
import type { ApiHubServiceDetails, SchemaType } from '@microsoft/logic-apps-shared';
import type { MapDefinitionData, ExtensionCommand, ConnectionsData, IDesignerPanelMetadata } from '@microsoft/vscode-extension';

export interface IApiService {
Expand Down
3 changes: 1 addition & 2 deletions libs/chatbot/src/lib/ui/chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CopilotPanelHeader } from './panelheader';
import type { ITextField } from '@fluentui/react';
import { useTheme, Panel, PanelType, css, getId } from '@fluentui/react';
import { ShieldCheckmarkRegular } from '@fluentui/react-icons';
import { LogEntryLevel, LoggerService, ChatbotService } from '@microsoft/logic-apps-shared';
import { LogEntryLevel, LoggerService, ChatbotService, guid } from '@microsoft/logic-apps-shared';
import type { ConversationItem, ChatEntryReaction, AdditionalParametersItem } from '@microsoft/designer-ui';
import {
PanelLocation,
Expand All @@ -18,7 +18,6 @@ import {
ChatSuggestion,
} from '@microsoft/designer-ui';
import type { Workflow } from '@microsoft/logic-apps-designer';
import { guid } from '@microsoft/logic-apps-shared';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useIntl } from 'react-intl';

Expand Down
3 changes: 1 addition & 2 deletions libs/designer-ui/src/lib/connectors/predicates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HostService } from '@microsoft/logic-apps-shared';
import { HostService, getAllConnectorProperties, isBuiltInConnectorId, isCustomConnectorId, isString } from '@microsoft/logic-apps-shared';
import type { Connector, OperationApi } from '@microsoft/logic-apps-shared';
import { getAllConnectorProperties, isBuiltInConnectorId, isCustomConnectorId, isString } from '@microsoft/logic-apps-shared';

export const isBuiltInConnector = (connector: Connector | OperationApi | string): boolean => {
const hostIsBuiltInConnectorFn = HostService()?.isBuiltInConnector;
Expand Down
10 changes: 8 additions & 2 deletions libs/designer-ui/src/lib/tokenpicker/tokenpickerfooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ import type { GetValueSegmentHandler } from './tokenpickersection/tokenpickeropt
import { getExpressionOutput, getExpressionTokenTitle } from './util';
import { PrimaryButton } from '@fluentui/react';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { LogEntryLevel, LoggerService } from '@microsoft/logic-apps-shared';
import {
LogEntryLevel,
LoggerService,
ExpressionExceptionCode,
ExpressionParser,
ScannerException,
guid,
} from '@microsoft/logic-apps-shared';
import type { Expression } from '@microsoft/logic-apps-shared';
import { ExpressionExceptionCode, ExpressionParser, ScannerException, guid } from '@microsoft/logic-apps-shared';
import type { LexicalEditor, NodeKey } from 'lexical';
import { useMemo } from 'react';
import { useIntl } from 'react-intl';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import {
getLegacyConnectionReferenceKey,
getManifestBasedConnectionMapping,
} from '../../../actions/bjsworkflow/connections';
import { InitOperationManifestService, StandardOperationManifestService, OperationManifestService } from '@microsoft/logic-apps-shared';
import { createItem, ConnectionReferenceKeyFormat } from '@microsoft/logic-apps-shared';
import {
InitOperationManifestService,
StandardOperationManifestService,
OperationManifestService,
createItem,
ConnectionReferenceKeyFormat,
} from '@microsoft/logic-apps-shared';
import type { LogicAppsV2, OperationManifest } from '@microsoft/logic-apps-shared';

const nodeId = '1';
Expand Down
12 changes: 10 additions & 2 deletions libs/designer/src/lib/core/actions/bjsworkflow/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ import {
import type { NodeDataWithOperationMetadata } from './operationdeserializer';
import type { Settings } from './settings';
import { getOperationSettings, getSplitOnValue } from './settings';
import { ConnectionService, OperationManifestService, StaticResultService } from '@microsoft/logic-apps-shared';
import {
ConnectionService,
OperationManifestService,
StaticResultService,
ManifestParser,
equals,
getBrandColorFromConnector,
getIconUriFromConnector,
getRecordEntry,
} from '@microsoft/logic-apps-shared';
import type {
Connector,
DiscoveryOperation,
Expand All @@ -44,7 +53,6 @@ import type {
SomeKindOfAzureOperationDiscovery,
SwaggerParser,
} from '@microsoft/logic-apps-shared';
import { ManifestParser, equals, getBrandColorFromConnector, getIconUriFromConnector, getRecordEntry } from '@microsoft/logic-apps-shared';
import type { Dispatch } from '@reduxjs/toolkit';
import { createAsyncThunk } from '@reduxjs/toolkit';
import { batch } from 'react-redux';
Expand Down
14 changes: 11 additions & 3 deletions libs/designer/src/lib/core/actions/bjsworkflow/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ import {
import { isRootNodeInGraph } from '../../utils/graph';
import { updateDynamicDataInNode } from '../../utils/parameters/helper';
import { getAllVariables } from '../../utils/variables';
import type { IOperationManifestService } from '@microsoft/logic-apps-shared';
import { ConnectionService, WorkflowService, OperationManifestService } from '@microsoft/logic-apps-shared';
import type { Connection, ConnectionParameter, Connector, OperationManifest, LogicAppsV2 } from '@microsoft/logic-apps-shared';
import type {
IOperationManifestService,
Connection,
ConnectionParameter,
Connector,
OperationManifest,
LogicAppsV2,
} from '@microsoft/logic-apps-shared';
import {
ConnectionService,
WorkflowService,
OperationManifestService,
ResourceIdentityType,
optional,
isHiddenConnectionParameter,
Expand Down
22 changes: 9 additions & 13 deletions libs/designer/src/lib/core/actions/bjsworkflow/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ import type {
ISearchService,
IOAuthService,
IWorkflowService,
CustomSwaggerServiceDetails,
InputParameter,
OperationInfo,
OperationManifest,
OperationManifestProperties,
OutputParameter,
SchemaProperty,
SwaggerParser,
} from '@microsoft/logic-apps-shared';
import {
WorkflowService,
Expand All @@ -44,9 +52,6 @@ import {
OperationManifestService,
FunctionService,
ApiManagementService,
} from '@microsoft/logic-apps-shared';
import type { OutputToken, ParameterInfo } from '@microsoft/designer-ui';
import {
clone,
ConnectionReferenceKeyFormat,
CustomSwaggerServiceNames,
Expand All @@ -66,16 +71,7 @@ import {
unmap,
UnsupportedException,
} from '@microsoft/logic-apps-shared';
import type {
CustomSwaggerServiceDetails,
InputParameter,
OperationInfo,
OperationManifest,
OperationManifestProperties,
OutputParameter,
SchemaProperty,
SwaggerParser,
} from '@microsoft/logic-apps-shared';
import type { OutputToken, ParameterInfo } from '@microsoft/designer-ui';
import type { Dispatch } from '@reduxjs/toolkit';

export interface ServiceOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ import {
} from './initialize';
import { getOperationSettings, getSplitOnValue } from './settings';
import type { Settings } from './settings';
import { LogEntryLevel, LoggerService, OperationManifestService, StaticResultService } from '@microsoft/logic-apps-shared';
import {
LogEntryLevel,
LoggerService,
OperationManifestService,
StaticResultService,
getIntl,
ManifestParser,
isArmResourceId,
Expand Down
9 changes: 6 additions & 3 deletions libs/designer/src/lib/core/actions/bjsworkflow/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import {
import { buildOperationDetailsFromControls } from '../../utils/swagger/inputsbuilder';
import type { Settings } from './settings';
import type { NodeStaticResults } from './staticresults';
import { LogEntryLevel, LoggerService, OperationManifestService, WorkflowService } from '@microsoft/logic-apps-shared';
import type { ParameterInfo } from '@microsoft/designer-ui';
import { UIConstants } from '@microsoft/designer-ui';
import {
LogEntryLevel,
LoggerService,
OperationManifestService,
WorkflowService,
getIntl,
create,
removeConnectionPrefix,
Expand Down Expand Up @@ -54,6 +55,8 @@ import {
excludePathValueFromTarget,
getRecordEntry,
} from '@microsoft/logic-apps-shared';
import type { ParameterInfo } from '@microsoft/designer-ui';
import { UIConstants } from '@microsoft/designer-ui';
import type { Segment, LocationSwapMap, LogicAppsV2, OperationManifest, SubGraphDetail } from '@microsoft/logic-apps-shared';
import merge from 'lodash.merge';

Expand Down
10 changes: 8 additions & 2 deletions libs/designer/src/lib/core/graphlayout/elklayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import type { WorkflowNode } from '../parsers/models/workflowNode';
import { isWorkflowNode } from '../parsers/models/workflowNode';
import { useReadOnly } from '../state/designerOptions/designerOptionsSelectors';
import { getRootWorkflowGraphForLayout } from '../state/workflow/workflowSelectors';
import { LogEntryLevel, LoggerService, Status } from '@microsoft/logic-apps-shared';
import { useThrottledEffect, WORKFLOW_NODE_TYPES, WORKFLOW_EDGE_TYPES } from '@microsoft/logic-apps-shared';
import {
LogEntryLevel,
LoggerService,
Status,
useThrottledEffect,
WORKFLOW_NODE_TYPES,
WORKFLOW_EDGE_TYPES,
} from '@microsoft/logic-apps-shared';
import type { ElkExtendedEdge, ElkNode } from 'elkjs/lib/elk.bundled';
import ELK from 'elkjs/lib/elk.bundled';
import { useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { UnsupportedException, UnsupportedExceptionCode } from '../../../common/
import type { Operations, NodesMetadata } from '../../state/workflow/workflowInterfaces';
import { createWorkflowNode, createWorkflowEdge } from '../../utils/graph';
import type { WorkflowNode, WorkflowEdge } from '../models/workflowNode';
import { LoggerService, Status } from '@microsoft/logic-apps-shared';
import { getDurationStringPanelMode } from '@microsoft/designer-ui';
import {
LoggerService,
Status,
getIntl,
containsIdTag,
WORKFLOW_NODE_TYPES,
Expand All @@ -18,6 +18,7 @@ import {
getUniqueName,
getRecordEntry,
} from '@microsoft/logic-apps-shared';
import { getDurationStringPanelMode } from '@microsoft/designer-ui';
import type { LogicAppsV2, SubgraphType } from '@microsoft/logic-apps-shared';

const hasMultipleTriggers = (definition: LogicAppsV2.WorkflowDefinition): boolean => {
Expand Down
3 changes: 1 addition & 2 deletions libs/designer/src/lib/core/queries/browse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { SearchService } from '@microsoft/logic-apps-shared';
import { cleanConnectorId } from '@microsoft/logic-apps-shared';
import { SearchService, cleanConnectorId } from '@microsoft/logic-apps-shared';
import { useEffect, useMemo } from 'react';
import { useInfiniteQuery, useQuery } from 'react-query';

Expand Down
3 changes: 1 addition & 2 deletions libs/designer/src/lib/core/queries/connections.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getReactQueryClient } from '../ReactQueryProvider';
import { ConnectionService } from '@microsoft/logic-apps-shared';
import { SwaggerParser, equals } from '@microsoft/logic-apps-shared';
import { ConnectionService, SwaggerParser, equals } from '@microsoft/logic-apps-shared';
import type { Connector } from '@microsoft/logic-apps-shared';
import { useMemo } from 'react';
import { useQuery } from 'react-query';
Expand Down
16 changes: 13 additions & 3 deletions libs/designer/src/lib/core/queries/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ import type {
ManagedIdentityRequestProperties,
TreeDynamicExtension,
TreeDynamicValue,
FilePickerInfo,
LegacyDynamicSchemaExtension,
LegacyDynamicValuesExtension,
OpenAPIV2,
} from '@microsoft/logic-apps-shared';
import {
ConnectorService,
Types,
getPropertyValue,
equals,
getJSONValue,
getObjectPropertyValue,
isNullOrUndefined,
} from '@microsoft/logic-apps-shared';
import { ConnectorService } from '@microsoft/logic-apps-shared';
import type { FilePickerInfo, LegacyDynamicSchemaExtension, LegacyDynamicValuesExtension, OpenAPIV2 } from '@microsoft/logic-apps-shared';
import { Types, getPropertyValue, equals, getJSONValue, getObjectPropertyValue, isNullOrUndefined } from '@microsoft/logic-apps-shared';

export const getLegacyDynamicValues = async (
connectionId: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ import { getConnectionReference, isConnectionMultiAuthManagedIdentityType } from
import { useNodeConnectorId } from '../operation/operationSelector';
import { useOperationManifest, useOperationInfo } from '../selectors/actionMetadataSelector';
import type { ConnectionMapping } from './connectionSlice';
import { ConnectionService, GatewayService, OperationManifestService, isServiceProviderOperation } from '@microsoft/logic-apps-shared';
import { getRecordEntry, type Connector } from '@microsoft/logic-apps-shared';
import {
ConnectionService,
GatewayService,
OperationManifestService,
isServiceProviderOperation,
getRecordEntry,
type Connector,
} from '@microsoft/logic-apps-shared';
import { useMemo } from 'react';
import { useQuery } from 'react-query';
import { useSelector } from 'react-redux';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ConnectionReferences } from '../../../common/models/workflow';
import type { UpdateConnectionPayload } from '../../actions/bjsworkflow/connections';
import { resetWorkflowState } from '../global';
import { LogEntryLevel, LoggerService } from '@microsoft/logic-apps-shared';
import { deepCompareObjects, equals, getUniqueName } from '@microsoft/logic-apps-shared';
import { LogEntryLevel, LoggerService, deepCompareObjects, equals, getUniqueName } from '@microsoft/logic-apps-shared';
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';

Expand Down
Loading

0 comments on commit d37e304

Please sign in to comment.