From 2fb84034570e31d6c51b9ac4311fe80d2741e7bb Mon Sep 17 00:00:00 2001 From: easy1090 Date: Wed, 4 Dec 2024 12:12:43 +0800 Subject: [PATCH] fix: typo error --- packages/components/src/components/Alert/index.tsx | 5 ----- packages/components/src/components/Alert/types.ts | 4 ---- packages/sdk/src/sdk/multiple/controller.ts | 2 +- packages/sdk/src/sdk/multiple/index.ts | 2 +- packages/sdk/src/sdk/multiple/{slave.ts => primary.ts} | 0 packages/sdk/src/sdk/multiple/server.ts | 2 +- packages/types/src/rule/data.ts | 9 +-------- 7 files changed, 4 insertions(+), 20 deletions(-) rename packages/sdk/src/sdk/multiple/{slave.ts => primary.ts} (100%) diff --git a/packages/components/src/components/Alert/index.tsx b/packages/components/src/components/Alert/index.tsx index 5f50461c..f8f3dcc6 100644 --- a/packages/components/src/components/Alert/index.tsx +++ b/packages/components/src/components/Alert/index.tsx @@ -24,11 +24,6 @@ export const Alert: React.FC = (props) => { return ; } - // TODO: If need add emo alters. - if (data.type === 'emo') { - return <>; - } - if (data.type === 'package-relation') { const { getPackageRelationContentComponent } = props; return ( diff --git a/packages/components/src/components/Alert/types.ts b/packages/components/src/components/Alert/types.ts index 6b6e89aa..b2ab7467 100644 --- a/packages/components/src/components/Alert/types.ts +++ b/packages/components/src/components/Alert/types.ts @@ -32,7 +32,3 @@ export interface CodeViewAlertProps { export interface LinkAlertProps { data: Rule.LinkRuleStoreData; } - -export interface EMOAlertProps { - data: Rule.EMORuleStoreData; -} diff --git a/packages/sdk/src/sdk/multiple/controller.ts b/packages/sdk/src/sdk/multiple/controller.ts index 6a3e5d7d..adadd256 100644 --- a/packages/sdk/src/sdk/multiple/controller.ts +++ b/packages/sdk/src/sdk/multiple/controller.ts @@ -1,5 +1,5 @@ import { Manifest } from '@rsdoctor/types'; -import { RsdoctorPrimarySDK } from './slave'; +import { RsdoctorPrimarySDK } from './primary'; export class RsdoctorSDKController { readonly slaves: RsdoctorPrimarySDK[] = []; diff --git a/packages/sdk/src/sdk/multiple/index.ts b/packages/sdk/src/sdk/multiple/index.ts index b2a914dd..e392349b 100644 --- a/packages/sdk/src/sdk/multiple/index.ts +++ b/packages/sdk/src/sdk/multiple/index.ts @@ -1,2 +1,2 @@ export * from './controller'; -export * from './slave'; +export * from './primary'; diff --git a/packages/sdk/src/sdk/multiple/slave.ts b/packages/sdk/src/sdk/multiple/primary.ts similarity index 100% rename from packages/sdk/src/sdk/multiple/slave.ts rename to packages/sdk/src/sdk/multiple/primary.ts diff --git a/packages/sdk/src/sdk/multiple/server.ts b/packages/sdk/src/sdk/multiple/server.ts index f9164861..db4d37eb 100644 --- a/packages/sdk/src/sdk/multiple/server.ts +++ b/packages/sdk/src/sdk/multiple/server.ts @@ -1,6 +1,6 @@ import { Server } from '@rsdoctor/utils/build'; import { RsdoctorServer } from '../server'; -import type { RsdoctorPrimarySDK } from './slave'; +import type { RsdoctorPrimarySDK } from './primary'; export class RsdoctorSlaveServer extends RsdoctorServer { protected sdk: RsdoctorPrimarySDK; diff --git a/packages/types/src/rule/data.ts b/packages/types/src/rule/data.ts index e7e4eea1..f2b0f35a 100644 --- a/packages/types/src/rule/data.ts +++ b/packages/types/src/rule/data.ts @@ -1,4 +1,3 @@ -import type { WorkspaceCheckDataType } from '../emo'; import type { RuleMessage, RuleMessageCodeEnumerated } from './code'; import type { SourceRange } from '../sdk'; import type { PackageBasicData } from '../sdk/package'; @@ -127,11 +126,6 @@ export interface CodeChangeRuleStoreData extends BaseRuleStoreData { }; } -export interface EMORuleStoreData extends BaseRuleStoreData { - type: 'emo'; - emoCheckData: WorkspaceCheckDataType; -} - export interface OverlayRuleStoreData extends BaseRuleStoreData { code: RuleMessageCodeEnumerated.Overlay; stack?: string; @@ -142,7 +136,6 @@ export type RuleStoreDataItem = | FileRelationRuleStoreData | CodeChangeRuleStoreData | PackageRelationDiffRuleStoreData - | CodeViewRuleStoreData - | EMORuleStoreData; + | CodeViewRuleStoreData; export type RuleStoreData = RuleStoreDataItem[];